Document AI
What is a document workflow system, and how do you build one?
Reading the document is the part that demos well, and the system you are really building is everything that happens when the reading is wrong.
What is a document workflow system and how do you build one?
A document workflow system takes a document in, extracts what matters, checks it, routes it for a decision and records what happened. Start with one document type, then add validation outside the model, a human review queue for uncertain cases, and an audit log from day one.
The short version
- A document workflow system has five jobs: intake, extraction, validation, routing and an audit record.
- Extraction makes the best demo, but handling exceptions is where most of the design decisions sit.
- Validation should run in ordinary code outside the model, because a model can be confidently wrong about a total or a date.
- Automate one document type with frequent arrivals and stable rules before adding a second.
- Survey figures in this category often come from companies selling the product, so measure your own baseline first.
What does a document workflow system do?
A document workflow system moves a document from arrival to a recorded decision without someone retyping it. It has five jobs: take the document in, extract the fields that matter, check them, route the result to the next person or system, and log every step.
Most products in this category lead with extraction because it makes the best demo. Extraction is one job of five. An invoice read correctly and then left in an inbox has saved nobody anything. An invoice read incorrectly and posted to the ledger has created work that someone finds at month end.
Document workflow automation therefore means the whole path, including the path a document takes when something is wrong with it. That second path is where most of the design decisions sit.
How is a document workflow system different from OCR or a document chatbot?
OCR reads text, a document chatbot answers questions, and a document workflow system acts on what it read. The first two produce information for a person. The third changes something: it creates a record, requests an approval or sends a response.
That difference raises the stakes. A wrong chatbot answer gets read and doubted. A wrong workflow action gets executed, often without anyone seeing it. So a workflow system needs controls a chatbot can do without: validation, approval steps, and a way to correct an action after it has run.
OCR and language models are still components inside the system. Language models can read variable layouts that fixed templates struggle with, which makes this practical for documents that do not arrive in one format. They do not remove the need for the rest of the system.
Which document process should you automate first?
Start with one document type that arrives often, follows stable rules and has mistakes you can catch. Supplier invoices, purchase orders, delivery notes and standard intake forms are typical candidates for document process automation. Contracts under negotiation and unusual one-off correspondence are poor first choices.
Three questions decide it. Does a person currently apply rules they could write down? Can a wrong result be detected by a check, such as matching a purchase order? Is the volume high enough that the time saved will outlast the cost of running the system?
It is fine for the answer to be no. If a small team handles a few dozen documents a month, a shared inbox, a spreadsheet and a checklist may well be the right system. A simple tool with fixed templates also beats a custom build when your documents only ever come in one stable format.
How do you automate a document workflow, step by step?
To automate document workflow steps safely, build the path end to end for one document type with people checking everything, then remove the checking where the evidence supports it. That order gives you real correction data before you trust the system with anything.
What order should you build it in?
- Collect a sample from the real inbox, including bad scans, photos and PDFs holding several documents.
- Write the target schema: the exact fields, types and allowed values the next system needs.
- Have a person label the sample, so it can serve as your evaluation set.
- Build intake so each document gets a unique ID and the original is stored unchanged.
- Add extraction and measure it per field against the labelled set, because an overall accuracy figure hides the field that matters.
- Add validation in ordinary code: totals that sum, dates that make sense, suppliers that exist, purchase orders that match.
- Send everything to a review queue at first and record each correction.
- Release automatic routing one rule at a time, starting with the checks that have held up in review.
- Rerun the evaluation set whenever the model, the prompt or the document mix changes.
What should each part of the system be built with?
| Step | Build it with | Why |
|---|---|---|
| Intake | Ordinary code and storage | It must never lose a document, and it needs no judgement. |
| Classification | Rules first, a model where rules fail | Some documents can be sorted by sender or format alone. |
| Extraction | A model with a fixed output schema | Layouts vary, and this is where a model earns its cost. |
| Validation | Ordinary code | A check must give the same answer every time. |
| Routing | Written rules | The business should be able to read and change them. |
| Exceptions | A person with the source document on screen | Someone has to own the cases the system cannot decide. |
| Audit log | Append-only storage | You need to show what happened afterwards, including what the model returned. |
Where should a person stay in the loop?
Keep a person on any action that is costly or hard to reverse, and on any document that fails validation. Everything else can earn automatic handling through its review record, one rule at a time.
Do not rely on a model's confidence alone to make this call. A model can be confident and wrong, and a confidence score is not a measured error rate unless you have checked it against your own labelled data. Validation rules and business triggers make better gates: a payment above a set amount, a new supplier, a changed bank detail.
The review screen decides whether this works. Put the source document beside the extracted fields and show where each value came from. If checking takes as long as retyping, people will stop checking carefully. Record every correction, because the correction rate per field tells you when to loosen a rule and when to tighten one.
Do you need an AI agent, or is a fixed pipeline enough?
A fixed pipeline is enough for an automated document workflow in most cases. Use an agent only for steps where the next action depends on what the document says and cannot be listed in advance, such as chasing a missing detail across several systems.
A pipeline is easier to test, cheaper to run and simpler to explain to an auditor, because the steps are the same each time. An agent chooses its own steps, so the same document can take different paths, and each path needs testing.
The practical pattern is a pipeline with one narrow agent inside it. Give that agent read access and the ability to draft. Keep sending, posting and paying behind an approval. Log each tool call. If you cannot say what the agent is allowed to do in one sentence, its scope is too wide.
How do you tell whether the system is working after launch?
Track four things: the correction rate per field, the share of documents handled without a person, the time a document waits in the queue, and the errors found later. Together they show whether the system is saving work or only moving it.
Errors found later matter most and are the easiest to skip. Each one means a wrong value passed every check. Trace it back to the step that should have caught it, then add the document to the evaluation set.
Watch for drift as well. Suppliers change layouts, model versions change and the document mix shifts. A rising correction rate from one sender is often the first sign. Watch reviewers too. When a system is usually right, people stop looking closely, so audit a sample of approved documents.
What do the published numbers tell you about the return?
They tell you less than they appear to, so measure your own process before you decide. Many survey figures in this category come from companies with something to sell, and their samples may not look like your business.
Zapier's press release puts its 2021 survey at 2,000 U.S. knowledge workers at small and medium businesses, with no fieldwork dates or definition of that size band published. Adobe's time-saving analysis is a self-reported survey of 1,019 employed Americans across industries, not specific to small firms. Its page is undated and it promotes an Adobe product. The product page for Ardent Partners' State of ePayables 2025 research gives a sample of 204 AP professionals, from dedicated AP departments that may be larger than a firm of under 50 staff.
None of that makes these studies useless. It does make them a poor basis for a business case. You need time per document, documents per month and the share that need rework, measured on your own process for a few weeks. If you have no internal wage figure, the U.S. Bureau of Labor Statistics publishes May 2025 wage data for secretaries and administrative assistants as a public reference. It is US data, so adjust for your own market. We have no results of our own to publish here either, so your own measurements are the ones to trust.
Then count the other side honestly. Model usage, review time and maintenance all continue after launch. The Bureau's May 2025 wage figure for software developers alone is $135,980, or $134,040 when QA analysts and testers are included, and both exclude the self-employed. A system that needs a regular slice of that person's year has a running cost that a time-saving survey will not show.
Questions people ask
How long does it take to build a document workflow system?
It depends mostly on how messy your documents and destination systems are, so be wary of any fixed estimate given before someone has seen your samples. One document type going into a system with a clean API is a small project. Several types going into an old system with no API is not. The quickest route to a real estimate is a short test on your own documents.
Should we buy a platform or build a custom system?
Buy if your documents are common types in stable formats and the platform connects to the systems you already use. Build when the routing rules are specific to your business, the destination system is unusual, or you need control over where documents are processed. A mix is often sensible, with bought extraction inside custom routing. Trial any option on your worst documents, not the vendor's samples.
How accurate does extraction need to be before we automate?
There is no universal figure. It depends on what a wrong value costs and whether a later check would catch it. A misread reference that fails a purchase order match is cheap. A misread bank detail is not. Measure accuracy per field on your own labelled documents, set a threshold for each field, and keep a person on any field that has no independent check.
Is it safe to send sensitive documents to an AI model?
It can be, but that depends on the terms and the setup rather than on the model. Find out where documents are processed, how long the provider retains them, and whether they are used for training. Get those answers in writing. Limit who can open the review queue and the logs, because both hold the same sensitive content as the originals. Ask any supplier what they do not hold, as well as what they do.
What happens when a document format changes?
A supplier redesigns an invoice, a form gets a new version, or a new document type turns up in the same inbox. Model-based extraction often copes better than fixed templates, but it can fail quietly rather than loudly. Validation catches some of this. Watching the correction rate per field and per sender catches more. Keep a route that sends anything unfamiliar to a person rather than forcing it through.
Can we do this with a no-code automation tool?
Often, for a first version. A no-code tool can connect an inbox, an extraction step and a destination system quickly, and that may be all a simple process needs. It tends to get harder when you need per-field evaluation, a proper review screen or complex exception routing. Start there if your process is simple, and move on only when you can name the specific thing the tool cannot do.
Related on this site
Sources
- Zapier report: The 2021 state of business automation, Zapier's own survey of 2,000 U.S. knowledge workers at small and medium businesses. The sample size comes from Zapier's press release of April 21, 2021, not this page. No fieldwork dates or definition of small and medium business are published. The quote is a list item under the line 'Some of the most time-consuming tasks for small business employees are:'. · Zapier, data from 2021
- Adobe Acrobat AI Assistant Time Saving Analysis | Adobe Acrobat, Adobe's own self-reported survey of 1,019 employed Americans across industries, not specific to small firms. Adobe sells the product this study promotes. The page is undated and gives no fieldwork dates; the year is inferred from The Register's coverage of the survey on 5 Sep 2024. The quote omits the sentence's opening words, 'According to our survey,'. · Adobe, data from 2024
- State of ePayables (Part Nine): AP Benchmarks and Best-in-Class Performance - Payables Place, Ardent Partners' own State of ePayables 2025 research, capturing 204 AP professionals and their organizations. The sample size comes from the report's product page. Fieldwork dates and company-size mix are not published, and the respondents are dedicated AP departments, so they may be larger than a firm of under 50 staff. · Ardent Partners, data from 2025
- Secretaries and Administrative Assistants : Occupational Outlook Handbook: : U.S. Bureau of Labor Statistics, BLS Occupational Employment and Wage Statistics survey, May 2025 wage data. It excludes the self-employed, agricultural workers and private-household workers. No sample size is given on the page. · U.S. Bureau of Labor Statistics, data from 2025
- Software Developers, Quality Assurance Analysts, and Testers : Occupational Outlook Handbook: : U.S. Bureau of Labor Statistics, BLS Occupational Employment and Wage Statistics survey, May 2025 wage data. It excludes the self-employed, agricultural workers and private-household workers. No sample size is given on the page. The page's Quick Facts figure of $134,040 covers developers, QA analysts and testers combined; $135,980 is developers only. · U.S. Bureau of Labor Statistics, data from 2025