An automation that reads invoices and receipts β€” PDF or photo β€” and turns them into clean spreadsheet rows, with zero manual typing.

The Problem

Small businesses lose hours every week manually typing invoice and receipt data into spreadsheets. It's repetitive, error-prone, and gets worse when receipts come in mixed formats β€” some as scanned PDFs, others as phone photos with no consistent layout. Duplicate entries are common when the same file gets processed more than once.

The Solution

I built a workflow that watches a Google Drive folder for new invoice or receipt files. It automatically detects whether the file is a PDF or an image, routes it through the right extraction path, and uses AI to pull out the vendor, date, total amount, currency, and line items β€” then writes a clean row into a Google Sheet.

If the same file is ever processed again, the workflow updates the existing row instead of creating a duplicate, using the file's unique Google Drive ID to match records.

How it works

  1. Watch folder β€” a Google Drive trigger detects any new file dropped into an invoices folder
  2. Check file type β€” the workflow branches based on whether the file is a PDF or an image
  3. Extract content
  4. AI extraction β€” in both cases, the AI reads the content and returns structured data: vendor, date, total amount, currency, and itemized line items
  5. Save to spreadsheet β€” the data lands in Google Sheets, matched against the source file's unique ID so reprocessing never creates duplicates

What this saves

Tools used

n8n Β· OpenAI (GPT-4o mini, vision + text) Β· Google Drive Β· Google Sheets