Every night at 10 PM, a distributor I know sits down with 40-80 PDF invoices and copies them into a spreadsheet. Vendor names, dates, amounts with thousand separators, the occasional duplicate from a re-sent email. Three hours. Every single day. He tried ChatGPT — it hallucinated line items. He tried paying a VA — turnover every two months.
The embarrassing part: none of this work was skilled. It was parsing, deduplication, and arithmetic. All things a deterministic script does perfectly, every time, with zero hallucination.
The manual invoice pipeline is a tax on small businesses
If you handle invoices for a small business, you already know the failure modes:
- Duplicates — a vendor re-sends an invoice, you enter it twice, and the P&L quietly lies to you
-
Dirty numbers —
1,234.56and1234.56and$1,234.56all mean the same thing but Excel treats them as strangers - Vendor aliases — "Acme Corp" vs "Acme Corporation" vs "ACME CORP" split your reporting into three phantom suppliers
- Reconciliation — matching what you entered against what your bank says is the part nobody has time for, so it never happens
None of this needs AI. It needs deterministic parsing — the same rules applied to every file, with the same result every run.
What I built: a no-AI invoice cleaning kit
I packaged a small Python kit that turns your nightly ritual into one command:
-
invoice_cleaner.py— reads CSV exports of your invoices and:- dedupes exact and near-duplicate rows
- normalizes dates (
8/3/26→2026-08-03) - parses amounts with thousand separators and currency symbols (
$1,234.56→1234.56) - normalizes vendor names so "Acme Corp" and "ACME CORPORATION" become one supplier
- writes clean rows + an
errors.csvfor anything it couldn't parse (so nothing silently disappears)
-
reconcile_report.py— produces a reconciliation workbook: totals by vendor, by month, by week, in one Excel file with three sheets -
sample_invoices.csv— 12 rows of realistic dirty data so you can see it work before touching your own books
The philosophy is the opposite of ChatGPT: no guesses, ever. If it can't parse a line, it goes to the error file instead of inventing a number. Deterministic, auditable, and 100x faster than copy-paste.
What it saved
On my test data: 12 rows → 10 clean, 2 duplicates removed, and the 1,234.56 thousand-separator rows parsed correctly on the first try. The report files generate in under a second.
For the distributor: his nightly 3-hour ritual becomes a 5-minute export + one command + a quick skim of errors.csv. That's ~15 hours a week back, doing work a human was never supposed to do.
The full kit (cleaner + reconciler + sample data + docs) is at AgentChip.
The rule that keeps it honest
Never let a tool guess a financial number. If your pipeline can't parse a line, it should surface it for a human — not round it, not skip it, not "AI-complete" it. That single rule is the difference between software that helps your bookkeeping and software that quietly corrupts it.
Automate the copy-paste. Keep the human judgment. Your evenings are worth more than data entry.
Originally published on the AgentChip blog.
Top comments (0)