You will build an n8n workflow that watches a Google Drive folder, reads each invoice with gpt-4.1 and writes vendor, dates, tax and totals into a Google Sheet. A validation step blanks any value that is not in the document, so made-up numbers never reach your books. It suits anyone with a steady pile of supplier invoices. You need an n8n account and an OpenAI key.
YouTube video: I Caught My AI Making Up Fake Invoices (Then Fixed It With Claude Code + n8n)
Caption availability is unknown. Check the CC control in the YouTube player.
Choose a chapter (7)
- Video length
- 3 min 48 s
- Time to do it
- 30 minutes
- Difficulty
- Medium
- Steps
- 10
What you need
Steps
Set up your pieces first: an n8n account, a Google Drive folder for invoices, a Google Sheet with columns for vendor, invoice number, dates, subtotal, tax, total, currency and line items, and an OpenAI API key.
Download the free workflow template and import the JSON file into n8n. It already contains the Drive trigger, the extraction node, the validation step and the Sheet writer.
Open each node and connect your own credentials for Google Drive, Google Sheets and OpenAI. Use the Google account that owns the invoices folder.
Point the Drive trigger at your invoices folder and set it to watch for new files. Save the workflow and activate it so it runs on every upload.
Test with one invoice you already know the totals for. Drop the PDF into the watched folder and open the run. A clean row should land in the sheet in about 15 seconds.
Check the extraction node. gpt-4.1 reads the document and fills vendor, invoice number, dates, subtotal, tax, total, currency and line items.
Keep the validation step switched on. It compares every extracted value against the actual document text and blanks anything that is not on the page.
Map the validated fields to your sheet columns and run the workflow. Each row gets flagged OK or NEEDS REVIEW so you only open the exceptions.
For phone photos and scanned PDFs with no text layer, switch on the extra branch included in the template. It handles those files instead of failing on them.
Review the NEEDS REVIEW rows by hand against the original file and correct them in the sheet before you use the totals anywhere.
Tips and common mistakes
Never skip the validation step, or the model can write a supplier, invoice number and total that were never on the page.
Keep the original PDF or photo until the row is flagged OK, in case you need to check a value.
Watch date and currency formats. A sheet set to US dates will misread a day-first invoice.
Run a handful of known invoices through before you trust a whole month of them.
Questions
Do I need to know how to code?
No. You import the template, connect your credentials and point it at a folder. The workflow was already built with Claude Code, so you only edit settings.
What does NEEDS REVIEW mean?
The validation step could not match one or more values to the document text, so the row is flagged for a person to check before you rely on it.
Can it read phone photos of invoices?
Yes. The template includes an extra branch for phone photos and scanned PDFs without a text layer.
The notes are drafted automatically from video details and general task knowledge. How the guide was prepared
Report a correction


