Automated Invoice Data Extraction using OCR and GPT-4o-mini - n8n Workflow

This workflow watches a Drive folder for new invoices, extracts text with OCR, asks GPT-4o-mini to normalize invoice fields, checks duplicates, and writes the final ledger row to Google Sheets.

Workflow Preview

Preview the automation flow before importing the JSON into n8n.

8 Nodes JSON May 18 2026
G
Google Drive Trigger Trigger
D
Download File Step 2
M
Mistral OCR Step 3
O
OpenAI GPT-4o-mini Step 4
S
Structured Output Parser Step 5
I
If Duplicate Step 6
G
Google Sheets Step 7
S
Slack Alert Output

Ready to automate?

Download this n8n workflow JSON and import it into your n8n canvas.

Download Workflow

n8n Nodes Used

Google Drive Trigger Download File Mistral OCR OpenAI GPT-4o-mini Structured Output Parser If Duplicate Google Sheets Slack Alert

Who is this best for?

Finance, operations, and bookkeeping teams that need to process supplier invoices without manually copying totals, dates, and vendor information.

Überblick

This workflow watches a Drive folder for new invoices, extracts text with OCR, asks GPT-4o-mini to normalize invoice fields, checks duplicates, and writes the final ledger row to Google Sheets.

How it Works

  1. Watch a Google Drive folder for newly uploaded invoice PDFs.
  2. Run OCR and extract raw invoice text with page-level context.
  3. Normalize invoice number, vendor, due date, currency, tax, and line totals.
  4. Check whether the invoice already exists in the ledger.
  5. Append clean data to Google Sheets and send a Slack notification.

Inputs and Outputs

Required Inputs

  • Invoice PDF
  • Drive folder ID
  • Ledger sheet ID

Workflow Outputs

  • Clean invoice ledger row
  • Duplicate warning
  • Slack processing summary

Related n8n Workflows