Once a month, someone on your team opens a spreadsheet, makes a list of the invoices that should arrive, and then goes through the inbox one email at a time. Supplier, amount, period, tick. It takes hours, it is easy to miss one, and at the end you still aren't sure whether everything that should have come in has come in.
If you are a business of 5 to 25 people without a finance department, you don't need accounts payable software for this. You need a clear list of what to expect, a way to read the invoices as they arrive, and a short list of exceptions for a person to look at. Below is how I built that for a client, part by part, and what I learned along the way.
Who this is for
This approach fits when:
- the invoices are predictable, because they follow from work that is running (contracts, subscriptions, retainers, hours billed per month)
- you receive somewhere between a dozen and a few hundred a month
- they arrive by email, usually as a PDF
- the person checking them also has another job
If you get five invoices a month, a checklist will do. If you get thousands and they need approval flows, a proper accounts payable tool or your accountant's software is the better fit.
Why the manual check takes so long
The checking itself is not the slow part. The slow part is everything around it: rebuilding the list of what to expect, finding each invoice, opening the PDF, copying the details, and keeping track of where you were when someone interrupted you.
Those are the steps a system can take over. The judgement call (“this amount is higher than last month, is that right?”) is a small part of the work, and that part stays with a person.
How the setup works
This is the structure I built for a B2B service company. It runs on Google Workspace: Gmail, Google Drive, Google Sheets and Google Apps Script, with Claude reading the PDFs and Slack for the messages to the team.
A list of what to expect, made every month
Everything starts with one source: a sheet of the work that is running. On the 1st of each month, a script creates a new monthly tab in the payments spreadsheet from that sheet. The expected invoices are listed before they arrive, and nobody copies last month's tab by hand.
If you don't have such a source, or it isn't kept up to date, fix that first. No automation can check invoices against a list that is wrong.
A script that reads the invoice mailbox
The script runs under the account of the shared invoice mailbox. Because it runs as that account, it can use Gmail, Drive and Sheets without extra authorisation. Gmail filters label invoice emails when they come in, the script looks for those labels, and it adds its own status labels as it works through them.
Every 4 hours it picks up the new invoice emails.
Claude reads each PDF
For each PDF, the script sends it to the Claude API. Claude decides what the document is: an original invoice, or something else such as a reminder or a receipt confirmation. It also decides which way the invoice goes (received or sent) and which of the company's legal entities it belongs to. For that last question it uses the KvK number (the Dutch Chamber of Commerce number) instead of the address, because two of the entities share one address.
What Claude reads is written into the monthly tab, next to the invoice that was expected.
Plain code for the rules
The bookkeeping rules are ordinary code, not AI. Lines that match nothing go into a queue tab with the reason, and the queue is tried again every 6 hours. If a name was spelled differently and someone fixes it, the line lands by itself on the next try. An aliases tab maps different spellings of the same name.
A weekly check compares the rates and VAT on the lines with what was agreed and flags anything that deviates. A log tab records every PDF that was read, what was taken from it and where it went. The invoices are also forwarded by email to the bookkeeping software, and the script tracks the confirmations.
Messages to Slack: red and blue
Everything a person has to act on goes to Slack. Red means someone has to do something: an invoice that fits nowhere, a rate that deviates, a send that failed. Blue is for information. All messages of one day are bundled into one thread, so the channel reads like a short to-do list instead of dozens of separate messages.
A schedule that also checks itself
15 scheduled triggers keep it running. Besides the scans, there is a weekly overview on Monday of everything still open, and a monthly check on the 10th that compares what was expected with what was booked. By the 10th most of the previous month is in, so a line that is still empty then is a real signal.
A follow-up scan looks 14 days back for credit notes that came in as replies to earlier emails. And every Friday a heartbeat checks when the last scan ran. If that was more than 12 hours ago, it sends a warning. Without that, a stopped script and a quiet week look exactly the same.
A lock stops two runs from booking the same invoice twice. The Claude API key and the Slack token are stored in the script's settings, not in the code.
What a person still does
Someone picks up the red Slack messages every day, reads the weekly overview and goes through the monthly check. That check of the exceptions now takes about 10% of the time the full manual check used to take. You can see the chain on the invoice checks project page, and the build step by step in Check supplier invoices automatically.
What I learned building it
- Decide what the source of truth is before you automate. Here it is the sheet of running work. Everything else follows from it.
- Let the AI do the reading, let plain code apply the rules, and let a person handle the exceptions. Invoices look different from every sender, so a fixed template would break on the first new layout. Calculations and comparisons belong in code, which gives the same answer every time.
- Keep a queue with reasons. Something that doesn't fit should end up somewhere a person can see it, with the reason it didn't fit.
- Make silence visible. The Friday heartbeat is a small thing, and it is what tells you the system is still running.
- Watch out for labels and filters that look alike. Two similar labels once made some emails invisible to the script.
- Invoices that a customer creates on your behalf (self-billing) are easy to confuse with your own invoices. The instructions for Claude have to say explicitly how to tell them apart.
Set the matching rules before you build
The most useful hour you can spend is writing down, in plain words, when an invoice counts as “matched”. For example:
- the sender matches the expected supplier
- the period matches the month being checked
- the amount and VAT match what was agreed, within a margin you choose
- the invoice number hasn't been seen before
Anything that fails one rule goes on the exception list. Start strict. It is easier to relax a rule after a few months than to find out that the system has been waving through invoices it shouldn't have.
When not to automate this
- Your accounting software already does it. Many packages can read invoices and match payments. Check what you already pay for before building something next to it.
- Your invoices aren't predictable. If every month is different and there is no list of running work, there is nothing to check against.
- The volume is small. With a handful of invoices a month, the time saved rarely covers the setup and upkeep.
- Invoices come in through supplier portals. If you have to log in to five websites to download them, sort that out first, for example by asking suppliers to email invoices to one address.
Frequently asked questions
Can Google Sheets check invoices automatically?
Yes, with help. Sheets holds the list of expected invoices and the results. Google Apps Script creates the monthly tab, reads the emails from Gmail and applies the rules. For reading details out of PDFs that all look different, you need an extra step, such as a language model like Claude.
Is it safe to let AI read our invoices?
It can be, with the right setup. Use an API or a business plan where your data isn't used for training by default, let the model only read and classify, and keep a person checking the exceptions. Keep keys out of the code. Check this against your own privacy obligations and talk to your accountant if you are unsure.
What if the script stops running?
Then you want to know quickly. A heartbeat message that warns when the last scan is too long ago catches that. Without it, a quiet week and a broken script look the same.
Does this replace my bookkeeper?
No. It replaces the hours spent finding and comparing invoices. Your bookkeeper or accountant still handles the books, VAT returns and anything that needs professional judgement. A cleaner list makes their work easier too.
If your monthly check sounds like the one at the start of this article, book a get-to-know call and we'll look at whether this setup fits. Or get one practical tip a week in The Monday note.