Invoice processing, from inbox to ledger
Agents read incoming invoices, extract and validate the fields, match against purchase orders, and queue exceptions for a human.
Invoice processing, in brief
| The job | Agents read incoming invoices, extract and validate the fields, match against purchase orders, and queue exceptions for a human. |
|---|---|
| Tools it needs | QuickBooks, Gmail, Google Drive, Google Sheets, Slack |
| Setup | 4 steps, about ten minutes |
| Runs when | Something happens in Google Sheets |
| Approval | Yours, per category — nothing is sent on your behalf unless you say so |
| Where it runs | Your own machine. Credentials stay in a local vault. |
What the agent actually does
Only the exceptions reach a person
Supplier, invoice number, dates, line items, tax, total — pulled from whatever format arrived, then checked for internal consistency. Line items that do not sum to the stated total become an exception rather than a posted entry.
Match to POs
Each invoice is matched against the purchase order and, where you use one, the receipt. Clean three-way matches proceed; discrepancies in price, quantity or supplier are queued with the mismatch stated explicitly.
Books stay clean
Validated entries are written to QuickBooks or your ledger with the source document attached, so every posted line can be traced back to the invoice it came from without a search through an email archive.
The tools this job needs
QuickBooks
Where the work arrives. The books — kept clean without the keying. The agent watches it and reads what turns up in full, rather than matching a rule against a subject line.
Gmail
Context the agent pulls in before deciding. The inbox most operations still start in. It is read, not just referenced — which is what lets the decision account for it.
Google Drive
Context the agent pulls in before deciding. Where the documents live — and pile up. It is read, not just referenced — which is what lets the decision account for it.
Google Sheets
Where the result lands. The database every team already has open. Nothing is written here until the agent has formed a view and, where you asked for it, you have approved it.
Get this agent
Accounts Payable
Agents read incoming invoices, extract and validate the fields, match against purchase orders, and queue exceptions for a human.
Runs on your own machine. Asks for Gmail, QuickBooks, Google Sheets and nothing else — you approve the connection, and the agent inherits whichever AI model you already use.
You can see exactly what it did
Where the time actually goes in AP
Very little of accounts payable is difficult; almost all of it is transcription and chasing. Somebody opens an attachment, keys eight fields, looks up a PO, notices a five-pound discrepancy, emails the supplier, and files the document somewhere it can be found in an audit. Repeat several hundred times a month. The judgment content of that work is small and concentrated in the exceptions.
Exception-only review is the goal
The right measure of an AP automation is not how many invoices it processed but how few needed a person. Clean matches should flow through untouched; a human should see the price mismatch, the duplicate, the supplier who has never invoiced before, and the amount that exceeds a threshold you set. Everything else is noise being routed to an expensive reviewer.
Controls get stronger, not weaker
This is the objection worth taking seriously, and the answer is the receipt. Every posted entry links to the document, the validation checks that ran, the match result and the approval that released it. That is a materially better audit trail than a spreadsheet plus somebody’s memory, and it is produced automatically rather than assembled the week before an audit.
Build it in AGNT
- Connect the inbox invoices arrive at, plus QuickBooks or the ledger you post to.
- Load your PO data so matching has something to match against.
- Set the thresholds: what may post automatically, and what always needs a person.
- Run a month of historical invoices first and compare the output against what was actually posted.
Build it: the workflow file
Here is the shape in full rather than in prose: a trigger, a decision, an action. Paste the definition below into a new workflow and it loads exactly as drawn.
{
"id": "1266e188-00cd-4732-a6fe-115c5efd09ec",
"name": "Invoice processing, from inbox to ledger",
"nodes": [
{
"id": "5b494cb8-c0d1-4723-a83c-5d0f7100fcf6",
"text": "Watch Google Sheets",
"x": 512,
"y": 144,
"isEditing": false,
"type": "google-sheets-new-row",
"icon": "connect",
"category": "trigger",
"isSelected": false,
"parameters": {},
"description": "Listen for new rows added to a specified Google Sheet and trigger the workflow when a new row is detected.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
},
{
"id": "ebd5411b-334b-4ae8-ad73-a13df14d80e4",
"text": "Read it and decide",
"x": 512,
"y": 336,
"isEditing": false,
"type": "agnt-agent",
"icon": "connect",
"category": "action",
"isSelected": false,
"parameters": {
"instructions": "Supplier, invoice number, dates, line items, tax, total — pulled from whatever format arrived, then checked for internal consistency. Line items that do not sum to the stated total become an exception rather than a posted entry."
},
"description": "Agents read incoming invoices, extract and validate the fields, match against purchase orders, and queue exceptions for a human.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
},
{
"id": "353c1ac9-7e9b-40b7-aea9-65d86304674a",
"text": "Act in Gmail",
"x": 512,
"y": 528,
"isEditing": false,
"type": "gmail-api",
"icon": "connect",
"category": "action",
"isSelected": false,
"parameters": {
"action": "Search and Read Emails"
},
"description": "A powerful tool to send, reply, read, organize, and manage attachments in Gmail.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
}
],
"edges": [
{
"id": "3ba2a688-93b2-4270-a72c-a6a2d5fe5894",
"start": {
"id": "5b494cb8-c0d1-4723-a83c-5d0f7100fcf6",
"type": "output"
},
"end": {
"id": "ebd5411b-334b-4ae8-ad73-a13df14d80e4",
"type": "input"
},
"startX": 800,
"startY": 168,
"endX": 512,
"endY": 360
},
{
"id": "a936240e-8cce-4323-ac41-115133d56c76",
"start": {
"id": "ebd5411b-334b-4ae8-ad73-a13df14d80e4",
"type": "output"
},
"end": {
"id": "353c1ac9-7e9b-40b7-aea9-65d86304674a",
"type": "input"
},
"startX": 800,
"startY": 360,
"endX": 512,
"endY": 552
}
],
"zoomLevel": 1,
"canvasOffsetX": 0,
"canvasOffsetY": 0,
"isTinyNodeMode": false
}
Get this running today
Free, local, and it asks for QuickBooks, Gmail, Google Drive, Google Sheets, Slack and nothing else.
Common questions
What about duplicate invoices?
Duplicate detection is one of the standard checks — same supplier, same number, or same amount and date — and a suspected duplicate is queued rather than posted.
Can it handle multiple currencies and tax rules?
Yes, provided you state the rules. Currency, tax treatment and rounding conventions are part of the validation you define rather than assumptions baked in.
Does anything post without human approval?
Only within the thresholds you set. Many teams start with every entry approved and relax it for small clean matches once the receipts justify it.