AI Invoice Email Extractor to Google Sheets
Month-end bookkeeping is an archaeology dig through your inbox for invoices and receipts. OCR-based expense tools charge per document and still botch layouts they haven't seen. This workflow watches a mailbox, has GPT-5.6 read each billing email, and appends structured fields to Google Sheets. Language models handle weird formats - forwarded chains, foreign currencies, plain-text receipts - better than template OCR ever did.
What this workflow does
- An Email (IMAP) trigger watches your inbox or a dedicated invoices@ address.
- A Code node pre-filters: only emails that look like invoices or receipts continue (keywords in subject or sender).
- An OpenAI node extracts vendor, amount, currency, invoice number, invoice date, and due date as JSON - or NOT_INVOICE if it's a false positive.
- A Code node validates the JSON and drops non-invoices.
- A Google Sheets node appends the row to your ledger.
Setup guide
- Import the JSON into n8n (Workflows > Import from File).
- Connect the IMAP node to the mailbox that receives invoices (host, port 993, app password).
- Add your OpenAI API key.
- Connect Google Sheets (columns: Received, Vendor, Amount, Currency, InvoiceNumber, InvoiceDate, DueDate, Subject).
- Activate, then forward yourself an old invoice email to test.
Want this running 24/7?
Self-host n8n on a cheap VPS and this workflow runs around the clock for less than a coffee a month.
Get an n8n VPS from $5/monthFAQ
Want the workflows this one is a warm-up for?
The Mega Bundle packs both WorkflowForge Pro volumes — 32 production-grade workflows: automations (cart recovery, lead scoring, invoice extraction) and AI agents (support agent, calendar assistant, research agent), each with a setup guide. $39 for both, instant download.
Get the Mega Bundle →Need it customized for your exact process?
I build custom n8n automations and AI agents professionally: your tools, your edge cases, tested and documented.
Hire me on Fiverr →