Typing invoices into a spreadsheet is slow, and one wrong digit is hard to spot later. This workflow does the typing. You upload an invoice to a small form, Gemini reads what’s printed on it, n8n checks the numbers, and a new row lands in your Google Sheet marked Needs review.
It doesn’t approve anything for you. You still open the invoice, compare the row and set it to Approved. The checks point you to the likely mistakes first.
What it does
- Upload: a form with one field, the invoice as a PDF, JPG, PNG or WEBP file.
- Read: Gemini returns the printed values: supplier and GSTIN, invoice number and date, taxable value, CGST, SGST, IGST, cess, round off, grand total and every line item.
- Check: the workflow flags missing values, a GSTIN with the wrong format or check digit, totals that don’t add up, line items that don’t add up to the taxable value, and an invoice that’s already in your sheet.
- Save: one row per invoice in your Google Sheet, with the flags next to it. Amounts are saved as numbers, so you can total them.
What you need
- n8n 2.x, on n8n Cloud or self-hosted
- A Gemini API key from Google AI Studio
- A Google account, for Google Sheets
On n8n Cloud, connecting Google Sheets is a “Sign in with Google” click. On self-hosted n8n you first create a small Google Cloud app; the setup guide walks you through it.
What’s in the download
- The workflow file to import into n8n
- Two fictional invoices to test with: a clean PDF, and a photo with two planted mistakes
- A setup guide with every step
- The MIT license: use it, change it, use it for your clients
How I tested it
On 31 October 2026, on n8n 2.45.7 (self-hosted on Windows) with Gemini 3.8 Flash, using the two sample invoices from the download:
- The clean PDF: one row, no flags. The negative round off (-0.82) was saved as a number.
- The photo with planted mistakes: both caught: a wrong GSTIN check digit, and a grand total ₹100 higher than the taxable value plus taxes.
- The clean PDF a second time: flagged as a possible duplicate of the first row.
That day Gemini took 22 to 100 seconds per invoice, and some requests got a “high demand” answer. Later my Gemini key hit its quota limit. Both times the form showed Google’s message and nothing was added to the sheet. I haven’t tested it with real invoices or on n8n Cloud yet.
What it doesn’t do
- It doesn’t decide GST rates, HSN/SAC codes or tax treatment. It reads what’s printed.
- It doesn’t look up a GSTIN on the GST portal. The check digit catches a single misread character, not a made-up number.
- It doesn’t post anything to Tally, Zoho Books or any other accounting tool.
Privacy: the invoice file goes to Google’s Gemini API. On the free tier, Google may use what you send to improve its products. For client invoices, use a paid API key and ask your client first.
FAQ
Is it free?
Yes, under the MIT license: use it, change it, use it for your clients.
Does it work on n8n Cloud?
It needs n8n 2.x. I tested it on self-hosted n8n. On n8n Cloud you skip the Google Cloud step, because Google Sheets has a “Sign in with Google” option there; I haven’t run the template on n8n Cloud myself yet.
Will it read every invoice correctly?
No AI reads every invoice perfectly, especially blurry photos. That’s why every row starts as Needs review, and why the checks are there.
Can you set it up for me, or connect it to my email or accounting tool?
Yes. See my services: I build it in your own accounts.