AgentCrafts

How to automate invoice data entry without losing accuracy

Reading invoices and typing them into a system by hand is a solvable problem. How the automation works, where it fails and what to check before trusting it.


Someone has to read every invoice, pull out the numbers, and type them into a system that will not accept the file as it is. If you are that someone, or you manage someone who is, this is one of the most straightforward problems to automate.

It is also one of the easiest to automate badly. Get it wrong and you end up with a system that quietly books the wrong amount, which is worse than the manual process it replaced.

Here is how I would approach it, and where the judgement actually sits.

The boring part is the easy part

Extracting text from a PDF is solved. Most invoices are text based rather than scanned images, and when they are images, OCR handles them well enough for the common case.

The fields you want are usually a small set: invoice number, date, supplier, total, tax, and the payment terms. Line items are harder, because they are a table, and tables need a different approach. That is where most of the engineering effort goes, and it is worth deciding early whether you need line items at all. If the total is what lands in your accounting system, the problem is much smaller.

The hard part is what the fields mean

Two suppliers both have a field called "Total". One includes tax, the other does not. One has a column called "Amount" that is per line, another where it is the invoice total. Nothing in the file tells you which.

This is where most invoice projects go wrong, and the reason is that it looks like a data problem when it is a meaning problem. If the business does not have a clear rule for what "Total" means from a given supplier, no amount of extraction accuracy will fix it.

So before anything gets built, I want a written answer to a few questions:

  • Which fields go into the accounting system, and what does each one mean?
  • What is the rule for a total that does not match the sum of the lines?
  • Which suppliers are in scope for the first version?
  • Who reviews the exceptions, and how do they tell the system it was wrong?

That last one matters more than it sounds. Every correction a reviewer makes is the system learning. If there is no way to feed corrections back, the exception queue only ever grows.

Where the confidence threshold goes

Here is the design decision I would argue for most strongly, because it is the one that separates a system people trust from one they check every line of.

Do not automate the ambiguous cases. Automate the clear ones and send the rest to a person.

Practically that means every extracted field carries a confidence score, and the invoice is only posted automatically when the important fields clear a threshold. Below the threshold, it goes to a review queue with the source document open next to the extracted values.

This is the opposite of the approach that maximises the number of invoices processed, and that is deliberate. An invoice system that books 98 percent of invoices and is wrong on the other 2 percent will lose your trust the first time it is wrong about something large.

The threshold is a business decision, not a technical one. I set it with the person who owns the process, and we watch the exception rate for the first few weeks rather than guessing it on day one.

Duplicates are the failure that gets noticed

Sending the same invoice twice is the error that reaches your accountant and damages the relationship. It happens more often than people expect, because most of these systems are triggered by an email arriving rather than by a new document being created.

The fix is to check whether the supplier and invoice number have been seen before, before anything is posted. If they have, the invoice is a duplicate and it goes to review with the original attached. That single check removes most of the double payment risk.

It is also worth deciding what happens when the same invoice number arrives with a different amount. That is either a correction from the supplier or a fraud attempt, and it should never post automatically.

What to connect it to

If your accounting software has an API, connect to it. Almost all modern accounting software does, and a small integration that writes a record is far more reliable than anything that drives the interface.

Where there is no API, an import file is usually the answer. A scheduled job that writes a clean CSV with the agreed columns and lets a human import it is a perfectly good outcome. It is not as automatic as you wanted, but it is far more robust than screen automation, and it survives a redesign of the accounting software's screens.

Screen automation, where a program clicks buttons in a web interface, is the option to avoid. It works until the interface moves, and it breaks silently in a way that is hard to notice.

What to measure

The number that matters most is the exception rate: what proportion of invoices needed a person. It tells you how much of the work is actually gone and it gives you a straight line to improve on. It should fall as the rules get sharper.

Cost per invoice is worth knowing, but it is a smaller decision than it looks, because the expensive part is normally the review of exceptions rather than the extraction.

And the one to keep: hours a week returned to somebody. That is the number the business cares about, and it is the reason the project was funded.

The honest version

This is one of the more automatable admin processes, and it is a good candidate for a first project because the input is bounded and the output is checkable.

The part that decides whether it works is not technical. It is whether the business can say clearly what each field means and who reviews what the system cannot decide. Get that written down first and the rest is ordinary engineering.

If you want the commercial side of it, the automation and integrations service covers how I connect the tools.

The automation and integrations service covers how I build this, and the pricing page explains what decides the cost.

The commercial side of it is on the hire page.

The extraction side is well trodden, and the n8n documentation on handling documents covers the shape of it if you want to look before scoping anything.

If you want the commercial side of it, the automation and integrations service covers how I scope and build this, and the pricing page explains what decides the cost.


Workflow automation

All blogs

Common questions

Questions about automating invoice processing

Can invoice data entry be fully automated?

Most of it can, but not all of it. The reading and the typing are the easy part. What needs a person is the judgement: a price that does not match the contract, a duplicate that looks legitimate, an invoice from a supplier you have never seen. The right target is a system that handles the clear cases and queues the rest.

How accurate is automated invoice processing?

On clean, consistent invoices it is very accurate. On messy ones the accuracy comes from the exceptions, not the average. I set a confidence threshold so anything below it goes to a review queue, and I measure the exception rate rather than claiming a percentage I cannot stand behind.

What OCR tool should I use for invoices?

It depends less on the tool than on the shape of your invoices. Consistent layouts from the same supplier do well with almost anything. Mixed layouts with handwriting and tables need a document model that understands the layout, not just character recognition. I usually test against a real sample before committing.

Will automated invoice entry work with my accounting software?

If it has an API, yes, and that is most modern accounting software. Where it does not, the alternative is an import format such as CSV, which is often cleaner than trying to automate a screen. The worst option is automating clicks in a browser, which breaks the moment the layout moves.

How long does invoice automation take to set up?

Two to four weeks for a single supplier type or a single format, longer if invoices arrive from many suppliers in different shapes. The bulk of that time is not the extraction. It is agreeing what the fields mean, which is the part teams underestimate.

What happens to an invoice the system is not sure about?

It goes to a queue with the extracted values, the source document and the reason it was flagged. A person confirms or corrects it, and the correction feeds back into the threshold. The aim is for the exception queue to get smaller over time, not to hide the uncertainty.

Where this fits

The connections that make an agent useful: your CRM, inbox, helpdesk, spreadsheets and internal software.

Automation and integrations

Keep reading

Let's build

Let's discuss your workflow

Tell me what your team does by hand every week. I'll tell you honestly whether an agent or automation is the right answer, what it would take, and what it needs to keep running.