CaptainYi logoCaptainYi
← Back to Tools

Invoice Extraction Assistant

Live

Extracts invoice data from email attachments and PDFs, then exports structured records to Xero.

This page shows simulated demo data for illustration purposes only.

How It Works

1

Email / PDF

Monitor inbox or accept file uploads

2

AI Extraction

Parse supplier, invoice #, line items & amounts

3

Supplier Match

Fuzzy-match against known supplier list

4

Validation

GST check, duplicate detection, amount rounding

5

Xero Export

Create bill via Xero API with correct account codes

6

Exception Log

Flag mismatches for manual review

142

Invoices Processed

128

Auto-Matched

115

Exported to Xero

14

Pending Review

Invoice #SupplierAmount (AUD)DateStatus
INV-2024-0841Oakridge Produce Pty LtdAUD 3,420.0012 Apr 2026Exported to Xero
INV-2024-0842Southern Cross MeatsAUD 7,815.5013 Apr 2026Matched
INV-2024-0843Blue Horizon Seafood Co.AUD 2,290.0014 Apr 2026Pending Review
INV-2024-0844Gippsland Dairy SuppliesAUD 1,560.7514 Apr 2026Exported to Xero
INV-2024-0845Murray Valley FreshAUD 4,100.0015 Apr 2026Matched
INV-2024-0846Riverland PackagingAUD 880.4015 Apr 2026Exported to Xero
INV-2024-0847Yarra Valley HerbsAUD 340.0016 Apr 2026Pending Review
INV-2024-0848Vic Wholesale OilsAUD 2,760.0016 Apr 2026Matched

Private Repository

This tool's source code is private. Contact me for technical details.

Tech Stack

PythonOpenAI APIXero APIFastAPIDocker
Contact me to learn more →

The problem

In a small food or wholesale business, supplier invoices do not arrive as clean data. They arrive as PDF attachments, forwarded emails, and phone photos of a docket. Someone retypes the supplier, the invoice number, the date, the GST, and the total into Xero. The slow part is not the typing. The expensive part is the duplicate bill, the GST line that does not match the total, or the supplier name that never linked to the contact, found weeks later.

The inbox is the queue, and the queue is invisible. A bookkeeper who is in two days a week cannot be the only person who knows which files were entered. The rest of the week an operator forwards “please pay this” messages, and the PDF sits in a downloads folder with a name like scan_004.pdf. There is no status, so the same invoice is opened twice or not opened at all.

An extraction assistant is worth building when it turns that queue into one row per document, with a status a person can trust: matched to a supplier, waiting for a human, or already sent to Xero. It is not worth building if it posts every bill with no hold point. The page above is the shape of that hold point. The figures in the demo are sample rows so the screen can be read. They are not a client’s results.

How the process works

The pipeline on this page is the one I use when a business wants email and PDF invoices to become Xero bills without losing the exception list.

  1. 1

    Capture

    Watch the inbox that suppliers already use, or accept a file someone drops in. The original PDF stays attached to the row so a question later does not start with “which file was that?”

  2. 2

    Read the fields that matter

    Pull supplier, invoice number, dates, line amounts, GST, and the total. A document that does not yield those fields is an exception, not a guess that gets posted.

  3. 3

    Match the supplier

    Compare the name on the PDF with the contacts you already pay. Fuzzy matching is there because “Blue Horizon Seafood” and “Blue Horizon Seafood Co.” are the same supplier until a strict match says they are not.

  4. 4

    Check before export

    Look for a GST total that does not reconcile, a duplicate invoice number, and amounts that have been rounded into a different dollar. Those rows wait.

  5. 5

    Create the bill

    When the row is clean, create the Xero bill with the account code the rule selected. The code is a rule you can point at, not a surprise the model invented on the day.

  6. 6

    Keep the exceptions

    Everything that did not export stays on a list with a reason. That list is the work. The exported rows are the work that no longer needs a person.

Before and after

Before

  • Invoices live in email and in a downloads folder, with no shared status.
  • Supplier names are retyped, so the contact in Xero and the name on the PDF drift apart.
  • Duplicates and GST mismatches show up when someone reconciles, not when the bill is created.

After

  • Each document is a row with a status: matched, waiting, or exported.
  • The supplier match is visible, and a weak match waits instead of posting to the wrong contact.
  • The exception list is the same day’s work, and the original file is still attached to the row.

Nothing here claims a percentage of time saved. The change is that the queue has a state, and the state is visible to more than one person.

Questions

Does this replace a bookkeeper?

No. It removes retyping and puts the doubtful invoices in one list. Coding judgments, disputes, and the decision to pay still belong to a person.

What if the invoice is a photo?

A clear photo can be read. A cropped photo that misses the GST line or the supplier name should fail the check and wait, rather than become a bill with a blank.

Which Xero fields get written?

The bill needs a contact, a date, a number, amounts, tax, and an account code. Line detail is included when the PDF actually contains it. The mapping is agreed before the first export, not discovered in the BAS.

Is the source code public?

This assistant’s repository is private. The page lists the stack. If you want the technical shape for your own file, use the contact page.

If your invoices still live in an inbox

Describe the mailbox, the kind of PDFs you receive, and who posts bills in Xero today. The useful build starts from that queue, not from a generic OCR demo.

Describe your invoice queue