Analysis updated 2026-05-18
Automatically extract vendor, total, and invoice number from incoming PDF invoices using an LLM.
Run extracted invoice data through business rules to auto-approve or flag it for a manager.
Route only the invoices that fail validation to a human, with an explanation of what looked wrong.
| elvaceishim/invoice-automation | 0xallam/my-recipe | 0xhassaan/nn-from-scratch | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Python | Python | Python |
| Last pushed | — | 2022-11-22 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 4/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires running multiple services (n8n, FastAPI, PostgreSQL) plus an OpenRouter API key, full steps are in SETUP.md.
This project automates a task that most companies still do by hand: opening every incoming invoice, checking whether it is from a known vendor, checking whether the math adds up, checking whether it needs a manager's sign-off, and deciding whether to pay it or flag it for review. The author built two AI-backed services that split this work the way two people in a small back office might. The first service only reads. It takes a PDF invoice and pulls out who it is from, what was bought, and what the total is, using a large language model instead of a rigid template matcher, so it keeps working even when a vendor changes their invoice layout. The second service only judges. It takes that extracted summary and checks it against a set of business rules, such as whether the vendor is approved, whether the total matches, and whether the amount is within a spending limit. If everything checks out it approves the invoice automatically, if something is wrong, it states exactly what and why, so a human reviewer does not have to start from scratch. Because the author did not have access to real company invoices, they built a test set of 30 synthetic PDF invoices with known correct answers, deliberately broken in six specific ways. On that test set, extraction succeeded on 29 of 30 invoices with full field accuracy, and validation made the correct approve-or-flag decision on all 29 that reached it. The one extraction failure, caused by a free-tier model timing out, was logged and routed to a human rather than guessed at. The pipeline runs as a webhook that receives a PDF, calls the extraction service, then the validation service, stores every decision and reason in Postgres, and sends a Telegram alert only when a human needs to look at something. n8n orchestrates the whole flow. The README also documents specific bugs the author hit and fixed during development, including a model garbling part of an invoice number and free-tier rate limits interrupting a run. The stack is n8n, FastAPI, PostgreSQL, Docker Compose, Python, an LLM accessed through OpenRouter, and the Telegram Bot API. Full setup and evaluation steps are documented in a separate SETUP.md file rather than the README itself.
An AI pipeline that reads incoming invoices with an LLM, checks them against business rules, and auto-approves or flags them for human review, tested on synthetic data with measured accuracy.
Mainly Python. The stack also includes Python, FastAPI, PostgreSQL.
No license is stated in the README, so usage rights are unclear.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.