Invoices read by AI, checked by something that can’t be fooled

The AI turns each invoice into fields and figures. A separate step, with no AI in it, then adds the numbers up. Clean invoices clear on their own; anything that doesn’t add up arrives with the discrepancy spelled out.

Tested 26 Aug 2026 on 4 invoices: 2 cleared automatically, 2 correctly flagged.

4 / 4invoices accounted for
2cleared with no human step
300.00error caught and named
14 / 14steps correctly wired

How it runs

Five steps, from a document arriving to a line ready for the books.

The workflow on the n8n canvas, left to right
  1. An invoice arrives

    One at a time or a whole batch. The layout, the language and the currency are not assumed in advance.

  2. The AI (Claude) reads it into fields

    Supplier, invoice number, dates, line items, subtotal, tax, total. It is told to report what is printed and never to tidy up anything that looks wrong.

    Subtotal read
    1377.50
    Total printed
    1953.00
  3. A plain check adds it up

    Do the line items come to the stated subtotal? Does subtotal plus tax equal the stated total? Are the required details there? No AI is involved in answering any of that.

    1377.50 + 275.50
    1653.00
    Difference
    300.00 — flagged
  4. Clean clears, flagged says why

    An invoice that adds up goes straight through. One that doesn’t carries the actual figures in a sentence, not a generic “needs review”. A document that can’t be read at all takes a third path, because there is no data to review.

  5. One report, nothing missing from it

    Both groups are brought back together into a single report, so the number of invoices that went in always matches the number accounted for.

    In
    4
    On the report
    4 — 2 cleared, 2 flagged

How it’s built

Three decisions that do most of the work.

A model cannot audit its own reading

Most tools that read invoices with AI stop at extraction, which is the easy half. The hard half is knowing when the reading is wrong, and asking the same model to double-check itself does not give you that: the misreading that produced the wrong number will happily confirm it. So the checking step is plain arithmetic, with no AI in it at all.

The AI is told not to be helpful

It is instructed to report what is printed and never to correct anything that looks off. That sounds backwards until you see why: a quietly fixed total is an error nobody can ever catch afterwards, because the evidence of it has been tidied away. The instruction and the arithmetic check are a matched pair — weaken either one and the guarantee is gone.

“Can’t be read” is not the same as “needs review”

A document the AI cannot read at all takes its own path rather than joining the review queue, because there is nothing in it for a reviewer to look at. The two cases need different handling, and merging them is how invoices go quietly missing between what arrived and what got into the books.

What was verified

Run for real on 26 August 2026 on four invoices, each chosen to land on a different outcome: one clean, one with a deliberate 300.00 arithmetic error, one missing its tax number and due date, and one in euros with German labels and comma decimals.

Result: 2 cleared automatically, 2 correctly flagged, the error named to the penny. The euro invoice was read correctly including its dates — 22.08.2026 was not mistaken for a US-format date, which is the usual way this goes wrong without anybody noticing.

The items were counted at every step: 4 in, 4 read, 2 plus 2 down the two paths, 4 back together, 1 report.

Not verified at scale: the live run covered four invoices, not a day’s worth. Speed and cost per hundred invoices would need a bigger run to state honestly.

Subtotal 1377.50 plus tax 275.50 comes to 1653.00, but the invoice states a total of 1953.00 — a difference of 300.00.

The actual sentence the check produced. It names both figures and the gap between them, so whoever picks it up already knows what to look at.