All case studies & publications

Accounting & Bookkeeping · Professional Services

AI Invoice Processing Automation

Anonymised engagement6 weeks
Client
Accounting firm · Bulgaria · 10-15 staff, books kept for 100+ client companies
Industry
Accounting & Bookkeeping
Department
Finance & Accounting
Region
Bulgaria
Duration
6 weeks
Delivery team
3 people

Every re-keyed invoice field is an error waiting for the closing. One scanned batch could hold 200 mixed documents, each split, read and typed in by hand. Now the batch lands in the accounting system already split, read and posted, and 97% of it needs no correction.

A working model of the approach on sample data. It plays on its own and pauses when scrolled away; nothing here touches a live system.

The results

97%
of documents need no correction
Six months in production. Extraction F1 score 0.95.
576 h
of data entry removed a year
72 working days, on the client's own ROI model.
2,731
invoice lines posted in one run
60 invoices, every row successful.

The challenge

Our client is a Bulgarian accounting and financial-management firm of 10-15 people keeping the books for more than 100 client companies in Microinvest, the most widely used accounting software in Bulgaria. Client companies send their paperwork once a month as a single scanned PDF, often around 200 documents: invoices mixed with receipts, returns, credit notes and whatever else was in the envelope, some of it handwritten.

The accountants split every batch by hand, picked out the real invoices, then typed each one in: the header, every line item, and the expense account each line belongs on. Per company, per month.

What it was costing them

  • Errors found at the worst moment. Every re-keyed field was a chance for a mistake that only surfaced at closing, when it is most expensive to fix.
  • A peak nobody can staff. Month-end volume arrives all at once, and a 15-person firm cannot hire for the peak.
  • Growth that cost headcount. Each new client company added typing hours, not margin.
  • A constraint that ruled out the easy answer. The firm and its clients depend on Microinvest. Replacing it was never on the table.
One 200-document batch, before and after
  • ~576 h a year typing every invoice by hand
  • Exceptions only a short review list
  • 97% of documents need no correction

The approach

We built an unattended, end-to-end invoice processing robot on a self-hosted n8n platform. It takes invoice entry off the team entirely and writes straight into the accounting system they already use.

From scanned batch to posted entry

  1. Intake. Batches are collected from the client's SharePoint library through the Microsoft Graph API, per company and per period.
  2. AI splitting and classification. A custom-trained Google Document AI splitter cuts the multi-page scan into individual documents and separates real invoices from receipts, returns and everything else.
  3. AI extraction, trained on Bulgarian documents. Supplier, UIC and VAT number, invoice number and date, net, VAT and total, and every line item with quantity and unit price, handwritten documents included. F1 score 0.95.
  4. Nothing guessed. A document that cannot be read with confidence is left for a person, not posted on a best guess.
  5. Business rules. Advance, final and advance-deduction invoices are skipped; prior-year invoices are held back; supplier plus invoice number must be unique, so a duplicate never posts.
  6. Validation and enrichment. Unknown suppliers are looked up in the Bulgarian Commercial Register and created with their default accounts. Invoices already marked as paid are detected and skipped.
  7. Account mapping the accountants own. An Excel workbook of description keywords, transaction types, IBANs and debit and credit accounts decides how each line posts. The accounting rules stay in the accountants' hands, not in code.
  8. Direct posting. Our own Microinvest connector writes validated documents straight into each company's database over MSSQL, through a VPN tunnel the robot opens before every run.
  9. Report and exceptions. Every row is logged as it is processed and compiled into an Excel report, filed to SharePoint and emailed. Anything not posted is marked as a system or business exception with a plain-language reason.
From scanned batch to posted entry
  • SharePoint intake
  • Split & classify
  • Extract fields
  • Rules & validation
  • Account mapping
  • Post to Microinvest
  • Report & exceptions
Anything that cannot be read with confidence goes to a person, not into the books.

The question that is only ever asked once

When a supplier name does not match, written in Latin script on the invoice and in Cyrillic in the accounting system, the accountant gets a one-click confirmation form. The answer is stored, so the same question is never asked twice. The exception list shrinks every month on its own.

Built to run unattended

  • Scheduled daily or triggered on demand through an authenticated link.
  • Safe to repeat after a failure: no duplicate entries in the report or in the books.
  • Monitored through a hypercare period after go-live.

Technology

LayerWhat we used
Orchestrationn8n, self-hosted
Document AIGoogle Document AI, custom splitter and extractor trained on Bulgarian invoices
Accounting systemMicroinvest Delta Pro, via our own MSSQL connector over VPN
EnrichmentBulgarian Commercial Register lookup
Documents and reportsMicrosoft SharePoint, Microsoft Graph API, Excel
Human in the loopWebhook confirmation forms, email
What the per-run report shows
  • Every row logged as processed
  • Execution ID and source document
  • Counterparty and date per line
  • Exceptions, with plain reasons
  • Filed to SharePoint and emailed

The outcome

The accountant opens the accounting system and the data is already there: split, read, mapped to the right client company and posted.

BeforeAfter
Splitting a 200-document batchBy handAutomatic
Typing header and line itemsEvery fieldNone
Documents needing correctionEvery one checked3%
Data entry a year~576 hoursException review only
Audit trailWhatever the accountant rememberedExecution ID, source document, counterparty and date on every posted line
  • 97% of documents processed without correction over six months in production.
  • 2,731 line items across 60 invoices posted in a single production run, every row successful.
  • About 576 hours, 72 working days, of data entry removed a year. On the client's own ROI model the robot pays for itself inside the first year and returns more than 300% by year three.
  • The team moved from typing invoices to reviewing a short exception report.
  • Reusable components. The Microinvest connector and the Commercial Register lookup built here now power the firm's bank reconciliation robot too.

The risk most teams miss

New suppliers and new invoice layouts arrive every month. Without an exception loop, extraction accuracy drifts quietly and errors creep back into the books. Here every answered exception is stored, so the system gets more complete the longer it runs.

Part of a three-robot programme for the same firm: bank statements download themselves, invoices post themselves, and payments reconcile themselves.

Next step

Start the same conversation

Tell us the process that keeps breaking. We will come back with what it would take to fix it, what it would cost, and what we would measure.

Or write to us directly: •••••@•••••••.•••

  • A reply from a partner within one business day
  • Fixed scope and fixed fee, agreed before we start
  • The maps and the backlog are yours either way