Wholesale & distribution

Supplier invoices read, checked, and filed without data entry

Invoices arrive as PDFs and phone photos from dozens of suppliers, each with its own layout. This system reads them, verifies the arithmetic, and only asks a human when something doesn't reconcile.

Trigger
New file lands in the invoice intake folder
Run mode
Hands-off, with a review queue for anything that fails validation
Built with
n8n · Gemini (vision) · Airtable · Gmail
Connected to
Google Drive · Airtable · Gmail

01 / Problem

What the manual version cost

Before the system existed, this all ran on someone's attention.

  • 01

    Supplier invoices arrive in every format there is — PDF, scan, phone photo — and no two suppliers lay them out the same way.

  • 02

    Someone retypes the header details and every line item into the accounting system by hand.

  • 03

    Typos surface weeks later at reconciliation, when tracing them back costs more than the original entry did.

  • 04

    Volume spikes at month end, exactly when the person doing the typing has the least time for it.

02 / Solution

What we built instead

Each decision below is a deliberate one — the interesting part is usually where the system refuses to guess.

  • 01

    A watched intake folder is the only interface. Drop a file in, the system takes it from there.

  • 02

    Gemini reads the document as an image, pulling header fields and the full line-item table. No per-supplier template to build or maintain.

  • 03

    Validation runs in code, not in the model: line items are summed and compared against the stated total within tolerance, and required fields are checked for presence.

  • 04

    The validation result decides the route. Clean invoices file themselves. Anything that fails is flagged and a reviewer is emailed the specific reason.

  • 05

    Line items are written as separate linked records, so the data is queryable per product rather than trapped in one text blob.

Intake to filed record

Every invoice passes the same check. The only branch is whether a human gets pulled in.

  1. Trigger

    Invoice arrives

    Google Drive

  2. AI

    Read invoice

    Gemini vision

  3. Logic

    Check totals

  4. mismatch
    Action

    Flag for review

    Gmail

  5. clean
    Action

    File invoice

    Airtable

03 / Result

What the system guarantees

Not projections. These hold because of how the system is built.

  • Arithmetic is verified before anything is written — a total that doesn't match its line items can't quietly enter the books.

  • Flagged invoices are still saved, marked for review rather than dropped, so nothing goes missing while it waits on a human.

  • The review email names the reason for the flag, so the reviewer opens the one field in question instead of re-checking the whole document.

  • Adding a new supplier requires no configuration. The extraction reads layout, not a mapping.

Next case study

Project documents that answer questions instead of being searched

Document search & Q&A