Invoices that read themselves — inbox to structured books by Jessy MariauInvoices that read themselves — inbox to structured books by Jessy Mariau

Invoices that read themselves — inbox to structured books

Jessy Mariau

Jessy Mariau

Supplier PDFs in, reviewed rows out
Supplier PDFs in, reviewed rows out
The most boring job in a small business: supplier invoices arrive as email attachments, and someone retypes them into the books. It's slow, and every typo lands in the accounts.

What I built

BakeryOS is my own bakery operations app. Each bakery gets its own invoice address. A daily worker collects new invoices from that mailbox and sends each PDF to Gemini, which extracts the supplier, the lines and the totals.
The extraction is checked before anything is trusted. The line totals must add up to the printed total before tax. Clear matches update ingredient prices and are archived with the original PDF. Anything incomplete, ambiguous or unusual goes to a review list for a person, and nothing is applied from an invoice whose lines don't add up.
The AI only reads the document. Plain code decides every number and every match, so a model mistake shows up as a failed check rather than a wrong price.

How I tested it

Before switching it on, I ran a set of 25 test invoices with known correct answers through the same code, from clean PDFs to poor scans. Across five runs it made no false matches. Its weak spot was missing lines on poor scans, and the totals check now catches those and sends them for review.
It runs every morning and writes a heartbeat row. A separate watchdog in the cloud raises an alert if that heartbeat goes stale, so a stopped pipeline is noticed.
Illustration with a synthetic invoice, no real supplier data
Illustration with a synthetic invoice, no real supplier data

The same pattern in n8n

I've also built an n8n version for Gmail and Google Sheets, shown above. AI reads the PDF, the totals are reconciled, and the row is either booked or sent to an exceptions sheet. The walkthrough is at fractionalhq.uk/use-cases/invoice-data-entry, and it suits a business that wants this pattern without building a custom app.
Like this project

Posted Jul 12, 2026

Each supplier invoice comes in as a PDF and leaves as a checked row. AI reads each one, the lines must add up to the printed total, and anything that doesn't is queued for a person. Built for BakeryOS, my own product.