Guide · Document automation

Document processing automation: getting data out of PDFs, invoices and emails.

How to turn the documents your team reads and re-keys into data your systems can use: which tool suits which document, a six-step pipeline, the checks that catch extraction errors, and how to measure whether it works.

What it is

Reading documents so your team does not have to.

Document processing automation takes the documents a business receives, such as supplier invoices, purchase orders, delivery notes, forms and emails, pulls out the information that matters and puts it into the right system. Done well, a person only sees the documents that fail a check.

It is not one technology. Optical character recognition (OCR) turns an image of a page into text. Extraction finds the fields in that text: the supplier, the invoice number, the date, the lines and the total. Validation checks the fields make sense. Language models have made the extraction step far more flexible, but the reading is still only one part of the job.

The common mistake is to start with the model. Start with the document types you actually receive, and how many of each.

Match the tool to the document

Which approach suits which document.

Most businesses receive a mix. Sort a month of documents into these rows before choosing anything.

DocumentApproachWhy
Spreadsheets, CSV exports, structured e-invoicesPlain code, no AIThe data is already structured. A parser is cheaper, faster and easier to test than a model.
Digital PDFs with a fixed layout from a few sendersTemplates or rules per senderSame layout every time, so position or pattern rules work and are easy to check.
Digital PDFs in many layouts, from many sendersA language model extracts the fields; rules validate themWriting a template for every supplier does not scale; a model copes with varied layouts.
Scans and phone photosOCR first, then extraction and validationThere is no text layer to read until OCR creates one. Image quality drives accuracy.
Emails and free-text messagesA language model classifies and extracts; a person reviews what mattersThe information is in sentences, not fields.
Handwriting, stamps and annotationsTest on your own samples before relying on itResults vary widely with the handwriting and the scan.

A starting point. Test any approach on a sample of your own documents before you rely on it.

The method

Six steps from inbox to system.

  • 01
    Intake
    Collect documents from wherever they arrive, such as a shared mailbox, an upload folder or a supplier portal, and keep the original with an ID so every result can be traced back to its source.
  • 02
    Classify
    Work out what each document is, such as an invoice, a credit note, a statement or something else, because each type needs different fields and checks.
  • 03
    Extract
    Pull out the fields for that type, using the cheapest approach that works for it: a parser, a template or a language model.
  • 04
    Validate
    Check the fields against rules and against your own records before anything is posted. This step catches most extraction errors.
  • 05
    Hand off
    Documents that pass go into the accounting, ERP or operations system through its API or an import. Documents that fail go to a person with the failed check highlighted.
  • 06
    Log and measure
    Record what was extracted, which checks ran and who changed what, so you can measure accuracy and see where the rules need work.
The checks

Validation is where accuracy comes from.

A language model can read a document fluently and still get a field wrong, or fill in a value that is not on the page. Never post its reading straight into your accounts. Check it first:

  • The arithmetic: line items add up to the subtotal, and subtotal plus tax equals the total.
  • The formats: dates are real dates, tax and company numbers have the right shape, and currencies are ones you deal in.
  • Your own records: the supplier exists in your system, and the bank details match the ones you hold. A change of bank details should always go to a person.
  • The order: the invoice matches a purchase order and, where you track it, a delivery. Accounts payable teams call this two-way or three-way matching.
  • Duplicates: the same supplier and invoice number, or the same amount and date, has not already been entered.
  • The source: the extracted value can be found on the page, so a reviewer can check it in one look.
Where AI fits

A model for the reading, rules for the deciding.

Many steps need no AI at all. A rule is cheaper, faster and easier to test than a model. A language model earns its place on the parts that read unstructured input, such as free text, documents or inconsistent references, and hands a structured result to the next step or to a person to review.

The illustrative sample on our AI readiness assessment page shows the split for supplier invoice data entry: a language model extracts the fields and a person checks the totals.

Measuring it

How to know whether it works.

Measure on your own documents, not on a vendor's demo set. Before the build, take a sample of a few hundred documents across your main types and record the correct values by hand. Then track:

  • Field accuracy: the share of fields extracted correctly, per document type and per field. A total read wrongly matters more than a missed reference line.
  • Straight-through rate: the share of documents that pass every check and need no person at all.
  • Exception rate and reasons: how many go to a person, and which check sent them there.
  • Time per document, before and after, including the time people spend on the exceptions.

Start with one document type from your largest senders, measure, then widen the rules. A narrow pipeline that is right beats a broad one nobody trusts.

Data handling

Documents carry personal and financial data.

  • Decide where documents and extracted data are stored, and for how long.
  • Check what your model or OCR provider does with the documents you send, and whether they are used for training.
  • Limit who can see the exceptions queue, since it holds exactly the documents that need a closer look.
  • Keep the audit trail: the original, the extracted values, the checks and the person who approved them.
How we build it

Plain code first, a model where the input is messy.

When Winspeed.ai automates a workflow, we map it and decide which steps should be plain code, which need a language model to read messy input and which should stay with a person, then build it and run it with you. Language models can classify, extract and summarize free-text input such as emails and documents, then hand a structured result to the next step or to a person to review.

We build in tracing, logging and regression tests, and prompts, tools and policies are versioned, so you can see each run and roll back like code.

More on our approach is on AI workflow automation. For the payment side of the same problem, see the hotel invoice reconciliation worked example, and for which steps a person should approve, human-in-the-loop AI.

Questions

Questions about document processing automation.

What is document processing automation?

Software that takes the documents a business receives, such as invoices, orders, forms and emails, extracts the information that matters, checks it and puts it into the right system, so a person only handles the documents that fail a check.

Is it the same as OCR?

No. OCR turns an image of a page into text. Document processing also classifies the document, extracts the right fields from the text, validates them and hands them to your systems. OCR is one step, and it is not needed at all for digital files that already contain text.

Do I need AI to process invoices?

Not always. Structured e-invoices and fixed layouts from a few suppliers can be handled with plain code and templates. A language model helps when invoices arrive in many layouts from many senders, and its output still needs validation rules.

How accurate is AI document extraction?

It depends on your documents: layout variety, scan quality and the fields you need. Measure it on a labelled sample of your own documents, and rely on validation checks, such as totals adding up and the supplier existing in your records, to catch the errors.

Where should a person stay involved?

On documents that fail a check, on changes to a supplier's bank details, on amounts above a threshold you set, and on any document type the system has not been tested on.

Tell us which documents your team re-keys.

Discovery calls are free and last 30 minutes, with someone who will actually do the work. If a simpler tool solves it, we will say so.

The button opens our enquiry form; we reply by email to agree a time for the call.

Coverage: Europe, Asia and remote. Email [email protected].