🧾 Automate invoice processing with AI data extraction, Google Drive & Sheets

⚑ 855 views · 🧾 Invoice Processing

πŸ’‘ Pro Tip β€” HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it β€” it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

🧾 Automated Invoice Processing - n8n Workflow

πŸ“– Workflow Description

This n8n workflow automates the complete processing of PDF invoices with AI-powered data extraction. The workflow monitors a Google Drive folder, extracts important invoice data, and automatically organizes files in a structured filing system.


🎯 Features


πŸ”§ Required Integrations

Required Accounts:

Used n8n Nodes:


πŸ“‹ Workflow Steps in Detail

1. Monitoring & Triggering

2. File Processing

3. AI Data Extraction

The Information Extractor node with Google Gemini extracts:

4. Automatic Filing

5. Documentation


βš™οΈ Setup Instructions

Step 1: Prepare Google Drive

Create the following folder structure in Google Drive:

πŸ“ [Input Folder] (e.g., "Invoices-Inbox")
πŸ“ [Main Folder] (e.g., "Accounting")
   └── πŸ“ 2024
       β”œβ”€β”€ πŸ“ January
       β”œβ”€β”€ πŸ“ February
       β”œβ”€β”€ πŸ“ March
       └── ... (all months)
   └── πŸ“ 2025
       └── ... (all months)

Step 2: Create Google Sheets Table

Create a spreadsheet with the following columns:

Step 3: Configure Workflow

Configure Google Drive Trigger:

Search files and folders:

Customize Information Extractor:

GetYearFolder & GetMonthFolder:

AddToOverview:


πŸ”§ Customization Options

Extend Data Extraction:

Add more attributes in the Information Extractor node:

{
  "name": "Payment Terms",
  "description": "Days until payment due",
  "required": false
}

Customize File Naming:

Change the schema in the UpdateFileName node:

"{{ $('Information Extractor').item.json.output.InvoiceNumber }} - {{ $('Information Extractor').item.json.output.Customer }}"

Change Monitoring Interval:

In Google Drive Trigger under β€œPoll Times” select different intervals.


🚨 Important Notes

⚠️ Permissions:

πŸ“ Data Format:

πŸ”„ Error Handling:


πŸ“Š Performance & Limitations


πŸ§ͺ Testing

  1. Run Test:

    • Upload a test PDF to the input folder
    • Monitor workflow execution in n8n
    • Check results in Google Sheets
    • Verify correct file movement and renaming
  2. Error Diagnosis:

    • For errors: check n8n logs
    • Consider Google API quotas
    • Validate folder permissions

πŸ“„ License & Support

This workflow can be used and customized freely. For configuration questions or issues, check the n8n community or Google API documentation.

Tip: Start with a few test invoices before using the workflow in production!

πŸ”— Nodes Used

Google Sheets, Google Drive, Google Drive Trigger, OpenAI Chat Model, Extract from File, Information Extractor

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup