Back to case studiesAI / Automation
Invoice Processing — AI Reads, Rules Check, a Person Approves
An n8n workflow that watches an invoices inbox, has AI read each PDF or photo, then checks it with plain rules (vendor, purchase order, maths, duplicates) and saves a draft bill for a person to approve. Nothing is paid automatically.
n8nGemini AIAirtableResend
Tested with real emailed invoices: wrong totals, closed POs, duplicates and a phone photo
The Problem
Typing supplier invoices into a spreadsheet or accounting tool is slow, and it's where small mistakes turn into overpayments: a total that doesn't add up, an invoice paid twice, a bill that goes over what was agreed. Letting an AI book them straight through would be faster, and worse.
Our Approach
- 1The AI's only job is reading: vendor, invoice number, dates, PO, line items, tax and total, copied exactly as printed, never corrected. A backup model takes over when the main one is busy, and a document neither can read is still logged for review instead of disappearing.
- 2Every decision after that is plain code: the vendor must be on the list, the PO must exist, be open, belong to that vendor and cover the total, each line and the totals must add up, and the same invoice number from the same vendor can't be booked twice.
- 3Testing with real emails found that several invoices arriving together made the inbox trigger hand over the same email two or three times. Each email's message ID is now remembered, so a repeat can never create a second draft.
What This Achieves
- An invoice whose lines add up to 2,660 while the total says 3,250 is flagged with exactly that sentence, before anyone pays it.
- A resent invoice is recognised and marked as a duplicate instead of being booked again.
- Every invoice is a draft with a clear status, and approvals are tracked, so 'drafts that needed no correction' becomes a real number.
Next Automation Case Study
Lead Score API — a Trained Model, Not a Prompt
Have something similar in mind?
Scope Your Project