KT Sparks

Bulgarian accounting practice · 10-15 people · bookkeeping for 100+ companies

AI That Reads and Posts Accounting Invoices

One monthly scan could hold 200 mixed documents, each separated, read and keyed in by hand. Any hand-typed field was a mistake that might surface only at closing. Now the batch arrives in the accounting system already separated, read and posted, and 97% of it goes through uncorrected.

AI That Reads and Posts Accounting Invoices
Industry
Accounting & Bookkeeping
Function
Finance & Accounting
Region
Bulgaria
Duration
6 weeks
Team
3 people

Results

97%
of documents go through uncorrected
Measured over six months live. Extraction F1 of 0.95.
576 h
less data entry every year
Equal to 72 working days, per the client's ROI model.
2,731
line items posted in a single run
From 60 invoices, with zero failed rows.

01

The challenge

The client is an accounting and financial-management practice in Bulgaria with a team of 10-15. It keeps the books for over 100 companies, all in Microinvest, the accounting package most Bulgarian businesses use. Once a month each company sends its paperwork as one scanned PDF, frequently around 200 documents. Invoices sit alongside receipts, returns, credit notes and anything else that went into the envelope, and some are handwritten.

Each batch was taken apart manually. Accountants found the genuine invoices and then keyed every one: header data, each line item, and the expense account for every line. That happened for every company, every month.

Where the hours and the risk went

  • Mistakes surfacing at closing. Any field typed by hand could carry an error, and those errors tended to appear at closing, the point where fixing them costs the most.
  • A month-end spike with no one to cover it. The whole month's volume lands at once. A team of 15 cannot hire people just to cover the spike.
  • Each new client meant more hours. Adding a company added keying time instead of margin.
  • No option to switch systems. Both the firm and its clients run on Microinvest. Replacing it was ruled out from day one.

02

What we did

We delivered an unattended invoice robot that runs end to end on a self-hosted n8n instance. The team no longer enters invoices at all, and the robot writes directly into the accounting system they were already using.

Nine steps from scan to ledger

  1. Collection. The robot pulls batches from the client's SharePoint library via the Microsoft Graph API, company by company and period by period.
  2. Splitting and sorting with AI. A Google Document AI splitter, custom-trained for this job, breaks the multi-page scan into separate documents and tells genuine invoices apart from receipts, returns and the rest.
  3. Extraction trained on Bulgarian paperwork. The model reads supplier, UIC, VAT number, invoice number and date, net amount, VAT and total, plus each line item with its quantity and unit price. Handwritten documents are covered too. F1 score: 0.95.
  4. No guesswork. If a document cannot be read with confidence, it goes to a person instead of being posted on a guess.
  5. Business rules. Advance invoices, final invoices and advance-deduction invoices are skipped. Invoices from the prior year are held. Each supplier and invoice number pair must be unique, so duplicates never reach the books.
  6. Checks and enrichment. A supplier the system does not know is checked against the Bulgarian Commercial Register, then set up with its default accounts. Invoices already flagged as paid are recognised and skipped.
  7. Mapping controlled by the accountants. How each line posts is decided by an Excel workbook that maps description keywords, transaction types and IBANs to debit and credit accounts. The accountants keep the accounting rules. The code does not.
  8. Posting straight to the database. A Microinvest connector we wrote ourselves writes validated documents directly into each company's MSSQL database. Before every run the robot opens a VPN tunnel for this.
  9. Reporting and exceptions. Each row is logged during processing, then gathered into an Excel report that is saved to SharePoint and sent by email. Anything left unposted is flagged as a system or business exception, with the reason in plain language.

Asked once, answered for good

Sometimes a supplier name will not match: Latin letters on the invoice, Cyrillic in the accounting system. The accountant then receives a confirmation form that takes one click. We store the answer, so that question never comes up again, and the exception list gets shorter each month without anyone working on it.

Designed for no supervision

  • Runs on a daily schedule, or on demand from an authenticated link.
  • Can be rerun safely after a failure, with no duplicate rows in the report or the books.
  • Watched closely during a hypercare period after launch.

Stack

LayerTools
OrchestrationSelf-hosted n8n
Document AIGoogle Document AI: custom-built splitting and extraction models, both trained on Bulgarian invoices
Accounting softwareMicroinvest Delta Pro, through our MSSQL connector over VPN
EnrichmentLookups in the Bulgarian Commercial Register
Files and reportingExcel, Microsoft SharePoint, Microsoft Graph API
Human reviewEmail and webhook confirmation forms

03

The outcome

When the accountant opens the accounting system, the data is waiting: separated, read, assigned to the correct client company and posted.

BeforeAfter
Separating a batch of 200 documentsManualAutomated
Keying headers and line itemsEvery fieldNothing
Documents correctedAll of them checked3%
Yearly data entry~576 hoursExceptions review only
Audit trailThe accountant's memoryEach posted line carries execution ID, source document, counterparty and date
  • 97% of documents needed no correction across six months of live use.
  • One production run posted 2,731 line items from 60 invoices, with no failed rows.
  • Roughly 576 hours of data entry gone each year, equal to 72 working days. The client's own ROI model shows payback within year one and a return above 300% by the third year.
  • Typing invoices gave way to checking a short exception report.
  • Parts that get reused. The firm's bank reconciliation robot now runs on the same Microinvest connector and Commercial Register lookup.

What usually goes wrong later

Every month brings new suppliers and new invoice formats. With no exception loop, extraction accuracy slips without anyone noticing and mistakes return to the books. In this setup each answered exception is saved, so coverage keeps growing the longer the system runs.

One of three robots we built for this firm: automatic bank statement download, automatic invoice posting, and automatic payment reconciliation.