The problem
Vendor invoices arrive by email in every format a supplier can think of, and someone opens each one, reads it, keys it into the accounting system and files the document somewhere. In the sourced company that was hundreds of emails a day and a team of 16, and errors and delays were inevitable. In a smaller business it is the owner's evenings.
Architecture
- Channel
- Accounts payable mailbox
- Agent
- Extracts the invoice fields
- Creates the record
- Files the PDF, queues errors
- Tools
- Power Automate and AI Builder
- Dynamics 365 Finance
- Human
- AP team: exceptions, approval
Where the data stays: Invoices and vendor bank details stay inside your Microsoft 365 tenant and Dynamics 365; the extraction runs in your own environment and payments are still approved by a person.
Design flow
- A vendor invoice email arrives in the AP mailbox
- AI Builder extracts the fields, a dozen date formats
- Low confidence or a failed check goes to exceptionsOnly sometimes
- The record is created in Dynamics 365 and the PDF filed
- AP team clears exceptions and approves paymentHuman checkpoint
Setup
Total time: 8 h our estimate
- 1 h
Done when: You know how many invoice emails arrive a day, your top 20 vendors by count, and the fields the accounting entry needs (vendor, number, date, due date, lines, tax, total).
- 2 h
Done when: The document processing model reads the fields from a sample of your top vendors' invoices, including the odd date formats, and you have written down what it misses.
- 2 h
Done when: A Power Automate flow takes each new invoice email, runs the model and writes the fields and a confidence to a review table; no record is created in Dynamics 365 yet.
- 1 h
Done when: A document says which cases stop (low confidence, unknown vendor, total not matching lines, duplicate number) and the resolution step for each, and the flow routes them to a queue a named person owns.
- 2 h
Done when: Clean invoices create the record in Dynamics 365 Finance and file the PDF in the right repository; for two weeks the AP team checks every created record against the email before approving payment.
Ticks are saved on this browser.
Risks and data
Data
Invoices carry vendor bank details and sometimes personal data of sole traders: keep the extraction inside your own tenant, restrict who can read the review table, and never let the flow change a vendor's bank account; a changed account number is always an exception for a person.
How it goes wrong
It goes wrong when a misread total or date is posted as a clean record, when a duplicate invoice is paid twice, or when the exceptions queue fills up because nobody owns it. The source's own success rate approaches three quarters of document lines, so roughly a quarter still need a person. Measure the rate per vendor, keep the two week check on created records, and treat the queue as a job with a name on it.
How the agent works
It starts
A Power Automate flow watches the accounts payable mailbox and ingests incoming vendor invoice emails.
The agent works
AI Builder's machine learning models extract the invoice data, handling variations in vendor formats, including more than a dozen date formats. The flow creates the records directly in Dynamics 365 Finance and routes the documents to the appropriate repositories. Error handling follows documented resolution processes; in your build, anything the model cannot read with confidence, or that fails a check, drops into an exceptions queue.
The result
The human checkpoint is that queue: a much leaner group works exceptions, inquiries and reconciliations instead of routine processing, and payment approval stays with a person.
Worked example
Graebel, a workforce mobility and managed services provider that has operated for more than 75 years (Microsoft customer story, 9 March 2026), had made invoice processing a daily bottleneck: hundreds of emails containing invoices arrived each day, each requiring manual review, data entry into Dynamics 365 and document routing across multiple systems, and a team of 16 people managed the workflow, yet errors and delays were inevitable. Its accounts payable invoice automation, built with Power Automate and AI Builder, ingests incoming vendor invoice emails, extracts data using machine learning models, creates records directly in Dynamics 365 and automatically routes documents to the appropriate repositories. The system handles complex variations in vendor data formats, including more than a dozen date formats, and incorporates error handling logic based on documented resolution processes. Since its initial go live in early 2022 it has processed hundreds of thousands of document lines year to date, with success rates approaching three quarters depending on document quality and vendor consistency, and a much leaner group now focuses on exceptions, inquiries and reconciliations rather than routine processing. Graebel plans to evolve it into vendor facing portals and conversational experiences with AI agents answering queries through Dynamics 365.
The source names Power Automate with AI Builder feeding Dynamics 365 Finance. The pattern (watch a mailbox, extract the invoice fields, create the record in the accounting system, file the PDF, queue the exceptions) is tool agnostic: Make or n8n with a document extraction step and your accounting system's connector does the same job. What you lose outside the Microsoft stack is the native link between the extraction model and Dynamics 365 records, so plan the mapping and the exceptions queue yourself.
Join the Agent OS Club
Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.
Founding offer, ends 31 December 2026 or at member 100
Join the Agent OS ClubBuilding this for an organization? Learn more at theagentiv.com
Sources
Published: 2026-11-17