Workflow Demo

AI reads the invoice, code checks the PO, you see what's off

A free n8n build reads each vendor invoice with AI, checks every line against the purchase order in plain code, and sends a person only the ones that don't match. That's the accounts-payable check small offices skip on busy weeks, packaged for bookkeepers to sell.

Published Oct 23, 2026

The Wow

What someone built

Robert Breen published the workflow on DEV (Oct 21, 2026): Gmail catches the invoice, n8n pulls the PDF's text, an AI extractor copies the printed fields into a fixed shape, and one Code node compares vendor, items, quantities, unit prices and total with the PO in Google Sheets. Matches go to the log; mismatches go to an approval email that waits for a yes or no.

Workflow Demo

License
A published tutorial with its code shown in full; no license is stated. Build your own from the steps rather than republishing it
Install
Follow the post: Gmail trigger with attachments, Extract from File (PDF), Information Extractor with the JSON example, Google Sheets 'Get PO rows', then paste the matching Code node and route on match_status.

Why it's remarkable

It gives AI the one job it's good at here, reading, and forbids it from "helpfully" fixing a total, because a wrong total is exactly what the check exists to catch. Billing less than ordered passes; billing more, or with no PO, fails.

The Opportunity

The business it reveals

An invoice-check add-on that a bookkeeper runs on each client's own accounts: a weekly list of the invoices that don't match, with plain reasons, before anything gets paid. The same matcher pointed at contracts becomes a price-creep audit.

Who would pay

Bookkeepers and fractional controllers serving 5- to 50-person firms that issue purchase orders. They already hold the client relationship and the data, so the add-on is one conversation away.

The Flip

3 ways you could turn this into a business

Price-creep audits on recurring vendor bills

Who pays
10- to 50-person companies with many software and service subscriptions
How it would earn
A one-time audit comparing a year of invoices with agreed prices (our hypothesis)
Why it might work
Point the same matcher at contracts instead of POs and it flags price rises and lines nobody agreed to.
What already exists
SaaS spend-management tools such as Vendr and Zylo, and expense platforms that track subscriptions.

Subcontractor invoice checks for small general contractors

Who pays
General contractors running 5 to 30 subcontractors
How it would earn
A per-project fee (our hypothesis)
Why it might work
Each sub's invoice can be checked against the subcontract and approved change orders before anyone pays it.
What already exists
Construction management tools such as Procore and Buildertrend include pay-application workflows.

Why we'd try "Invoice-check add-on for bookkeepers' small-business clients" first: The seller already has the client and the data, the build is free, and last month's invoices are a ready-made demo.

Build It

How you could build it

A weekly invoice check: read each invoice, match it to the PO, log matched ones, and send exceptions to the client with plain reasons.

First step: With a client's permission, build the guide's workflow on a copy of last month's invoices and purchase orders and count how many it flags.

Agents and tools

  • n8n
  • Gmail
  • Google Sheets
  • An AI model for extraction (ChatGPT, Claude, Gemini, Grok Bot or similar)

Setup

  1. Set up the guide's reading half (Gmail trigger, PDF extraction, Information Extractor).
  2. Put the client's POs in a sheet, one row per PO line.
  3. Paste the matching Code node and set the tolerances in writing with the client.
  4. Route matched invoices to the log and exceptions to an approval email.
  5. Spot-check the first two weeks against the PDFs.

What the agent does

  • Reads each invoice and copies the printed fields
  • Leaves missing fields empty instead of guessing
  • Drafts the weekly summary for the client

What you do

  • Agrees the tolerance policy with the client
  • Reviews and explains exceptions
  • Keeps paying invoices a separate, human step

Your first customer: An existing bookkeeping client that already issues purchase orders.

Test demand first: Run the match on one client's last three months of invoices. Success: it flags at least one real discrepancy the client agrees mattered, and they accept a paid monthly trial. Failure: nothing useful flagged.

Your starter instructions

Paste this into the AI agent you use (ChatGPT, Claude, Gemini, Grok Bot or another) as your first message. Copying it starts work in your own agent; it doesn't create or deploy a business by itself.

Build This Business

Opens our free launch plan for No-code automation setups for small businesses: tools, estimated costs, setup steps and the prompt.

Running it

What stays human: Writing the tolerance policy with the client, spot-checking the first weeks of rows against the PDFs, approving exceptions, and paying invoices, which stays a separate human step.

Startup cost (estimate)
About $0 to start (estimate) (Estimate: the build uses n8n, Gmail and Google Sheets, plus model usage per invoice. Not measured)
Running cost
Model usage per invoice (estimate pending a pilot) (Unknown until a pilot counts invoices and model calls; scanned invoices also need an OCR step)
How much the agent runs
People run it; AI helps with tasks.

Pricing your own version? Use the free startup-cost worksheet.

The evidence

What the source shows: The author's DEV post with every node and the full matching code (Oct 21, 2026). We read the code; we haven't run it on real invoices.

What's ours: The bookkeeper add-on, the price-creep audit and the subcontractor check are our applications.

Worth planning around

  • Scanned invoices without real text need an OCR step first.
  • Spot-check the first weeks against the PDFs, since AI can misread an odd layout.
  • Physical goods usually also need a receiving check (a three-way match).

Sources

Sources reopened Oct 22, 2026. Spot a mistake? Tell us and we'll correct it in public.

Keep reading

The Daily Paycheck: one remarkable AI business at a time, and exactly how you could build around it. Free; unsubscribe anytime.

Get new AI business discoveries by email.