6 min read
Automating invoice processing with local AI
From 5 minutes per invoice to 30 seconds: how a local AI workflow reads incoming invoices, structures them, and prepares them for accounting.
How much time does manual invoice processing cost?
An average SME spends more than 10 hours per month manually typing in incoming invoices, with an error rate of around 2 percent. With a local AI workflow, the processing time per invoice drops from 5 to 8 minutes to 30 seconds of review, while the cost per invoice falls from 12 to 15 EUR to about 2 EUR.
The process is identical in most companies. An invoice arrives by email. Someone opens it, downloads the PDF, reads off the invoice number, date, amount, and supplier, types everything into Excel or the accounting software, files the PDF, and moves on to the next one. Each invoice takes 5 to 8 minutes. With 100 invoices a month, that is more than 10 hours of pure manual work. On top of that come typos at a rate of around 2 percent, wrong amounts, transposed digits, forgotten invoices. In a department where accuracy is mandatory, not optional.
This is not an exotic problem. According to Ardent Partners, an average company with 50 to 250 employees processes between 500 and 5,000 incoming invoices per year. Across industries, the manual effort amounts to 12 to 15 euros per invoice, including working time, error correction, and archiving.
The good news: exactly this process can be almost fully automated with local AI. Not as a vision of the future, but with technology that is available today. The employee in accounting is not replaced, but instead of typing in every invoice by hand, they only review the result. 5 minutes of work become 30 seconds of review.
| Manual | With AI workflow | |
|---|---|---|
| Processing time per invoice | 5-8 minutes | 30 seconds of review |
| Error rate | approx. 2% (typos, transposed digits) | < 0.5% |
| Monthly effort (120 invoices) | approx. 13 hours | approx. 1 hour |
| Cost per invoice | 12-15 EUR | approx. 2 EUR |
What this means in euros depends on the volume. The calculation is based on an hourly rate of 35 EUR (accounting staff including employer costs), an average processing time of 6.5 minutes per invoice manually vs. 0.5 minutes of review, and estimated error costs of 25 EUR per faulty invoice. With 500 invoices per month, this multiplies accordingly.
Calculator
What does this save you per month?
12 hrs
time saved per month
420 EUR
per month
5,040 EUR
per year
Assumptions: 6.5 minutes per case by hand, 0.5 minutes with an AI workflow (review included), internal hourly rate 35 EUR.
How does an AI workflow for invoice processing work?
An AI-supported invoice workflow monitors the email mailbox via IMAP, extracts the text from incoming PDFs, and has a local language model (as of January 2026, for example Qwen 2.5 or Mistral) return the relevant fields as structured JSON. The data then passes through automatic plausibility checks and is exported directly into the accounting software, including automatic archiving of the original PDF.
The workflow consists of eight steps that run fully automatically. A human only steps in for special cases.
- 01
IMAP retrieval
A trigger monitors the invoice mailbox. As soon as a new email with a PDF attachment arrives, the workflow starts.
- 02
Extract the PDF
The attachment is read, and the file name and date of receipt are recorded for later archiving.
- 03
OCR and text extraction
Digitally created PDFs are read directly, scanned documents run through Tesseract with the German language pack.
- 04
AI extraction
A local language model returns the invoice number, amounts, and so on as structured JSON.
- 05
Plausibility check
Required fields, date formats, and the cross-check net plus VAT equals gross are checked automatically.
- 06
Export
The data goes into the target system: Excel, Google Sheet, accounting software, or database.
- 07
Archive
The original PDF is renamed and filed. In case of errors or special cases, a notification goes to the responsible person.
Everything begins with an IMAP trigger that monitors the invoice mailbox. As soon as a new email with a PDF attachment arrives, the workflow starts. The PDF is extracted, and the file name and date of receipt are recorded for later archiving.
In the next step, the text is read. For digitally created PDFs, this works directly, which applies to the majority of invoices. For scanned documents, OCR is used: Tesseract with the German language pack reliably recognizes umlauts and typical German invoice formats as well.
The core step is the AI extraction. The extracted text goes to a local language model, running via Ollama on the local hardware. The model receives a precise instruction: Extract the relevant fields and return them as JSON.
| Field | Example |
|---|---|
| Invoice number | 2026-00142 |
| Invoice date | 2026-01-15 |
| Due date | 2026-02-15 |
| Supplier name | Mustermann IT-Services GmbH |
| Net amount | 1,250.00 EUR |
| VAT rate | 19% |
| VAT amount | 237.50 EUR |
| Gross amount | 1,487.50 EUR |
| IBAN | DE89 3704 0044 0532 0130 00 |
Why AI instead of rules? Because in practice, every invoice looks different. Different layouts, different labels such as "Rechnungsnummer", "Belegnummer", or "Invoice No.", different positions on the document. A language model understands the context. It recognizes that "Rechnungsnr." and "Invoice Number" mean the same thing, without needing a separate configuration for each supplier. If a field is not found, it returns null; the model invents nothing.
The extracted data then passes through automatic plausibility checks: required fields must be present, date formats are normalized, amounts are checked for plausibility, and a mathematical cross-check ensures that net plus VAT equals the gross amount. If everything fits, the data is exported into the target system: Excel, Google Sheet, accounting software, or database. The original PDF is automatically renamed and archived, for example as 2026-01-15_Mustermann-IT-Services_RE-2026-00142.pdf. In case of errors or special cases, a notification goes to the responsible person.
Why should invoice processing run locally instead of in the cloud?
Local invoice processing solves three problems at once: GDPR compliance without a data processing agreement for external cloud AI, archiving in line with the GoBD on your own infrastructure, and protection of trade secrets such as supplier relationships and purchasing terms. Faulty or ambiguous invoices are automatically forwarded for manual review instead of being silently booked incorrectly.
Invoices contain sensitive business data: supplier relationships, prices, payment terms, bank details. Invoices from freelancers contain personal data: name, address, tax number. Local processing solves three problems at once.
First, the GDPR: no data transfer to third parties, no processing on behalf, no record of processing activities needed for external cloud AI. Second, the GoBD (the German principles for the proper keeping of books and records in electronic form): the original PDF remains unchanged in the local archive, the processing is logged and reproducible, and the 10-year retention period runs on your own infrastructure. Third, trade secrets: supplier relationships and purchasing terms remain confidential, with no risk of data being used as training data for cloud models.
No automation system is perfect. What matters is how errors are handled. Poorly scanned invoices (skewed, blurry, stained) automatically end up in the "Review manually" folder. Missing required fields such as the invoice number or amount prevent automatic booking. The invoice is forwarded for review, never silently swallowed. The model recognizes invoices from small businesses without VAT (Kleinunternehmer) by their pattern and correctly sets the VAT fields to zero. With mixed VAT rates (7% and 19%), the model can show both separately. And English invoices work as well, since the models used are multilingual.
The technical requirements are manageable: a local AI system with at least 8 GB of VRAM (for smaller models) or 32 to 64 GB (for more reliable large models), Ollama for model management, n8n as the workflow tool, IMAP access to the invoice mailbox, and 5 to 10 real invoices for testing. The effort for the initial setup is 10 to 12 hours, after which the system runs largely autonomously.
Conclusion
Invoice processing is not a glamorous topic. But that is exactly what makes it the ideal entry point into AI automation in the company: the process is clearly defined, the data is structured, the ROI is measurable, and the risk is low.
The technology is not rocket science: open-source models, compact hardware, proven workflow tools. All available, all documented, all operable locally. The most important step is the first one: not the perfect system from day one, but a working workflow that takes real work off your hands. From there, it can be expanded to quotes, contracts, delivery notes, orders. As soon as several such workflows work together, the result is what we call AI agents for companies.