Originally published on EpiFive, where it is kept up to date.
AI Builder document processing extracts fields and tables from invoices, forms and other documents inside a Power Automate cloud flow. You train and publish a model, or use a prebuilt one for invoices and receipts, then call it with the Process documents action. It costs credits per page: Microsoft's rate table lists 100 AI Builder credits per page for custom document processing and 32 for prebuilt invoice, receipt and identity analysis, or 8 Copilot Credits per page. Licensing changes on November 1, 2026, so the setup below includes a cost plan.
Who this is for and what you will have
This is for small-business owners, finance staff and admins who want to stop retyping invoice or form data. At the end you will have a flow that accepts a file, extracts values and passes them to later steps, a way to estimate monthly credit use and an understanding of what happens when credits run out. For the licence background see Power Automate licensing explained.
Prerequisites
- A Power Platform environment with Microsoft Dataverse. Microsoft lists this as the qualifying prerequisite for AI Builder.
- AI Builder capacity in that environment: AI Builder credits, or Copilot Credits.
- A Power Automate licence suitable for premium flows, because AI Builder actions are premium.
- Sample documents. For a custom model you need at least five examples that share the same layout, or you can use sample data to start.
Choose a model type
| Option | Use when | Cost per page |
|---|---|---|
| Prebuilt invoice processing | Standard invoices with common fields | 32 AI Builder credits, or 8 Copilot Credits |
| Prebuilt receipt or identity analysis | Receipts or ID documents | 32 AI Builder credits, or 8 Copilot Credits |
| Custom document processing | Your own forms, tables and layouts | 100 AI Builder credits, or 8 Copilot Credits |
| Text recognition (OCR) | You only need the text | 3 AI Builder credits, or 0.1 Copilot Credits |
The prebuilt invoice model extracts fields such as InvoiceId, InvoiceDate, DueDate, VendorName, InvoiceTotal, AmountDue and a list of line items. It accepts JPEG, PNG or PDF files up to 20 MB, images between 50 x 50 and 10,000 x 10,000 pixels, and processes the first 2,000 pages of a PDF. A limit of 360 calls per environment per 60 seconds applies across document processing models, including receipt and invoice.
Custom models come in three document types: Fixed template documents, General documents and Invoices. Fixed template has a quick training time, General is more flexible but slower to train, and Invoices lets you augment the prebuilt model with extra fields.
Step 1: Build and publish a custom model (optional)
Skip this step if you use the prebuilt invoice model.
- Sign in to Power Apps or Power Automate.
- In the left pane, select More, then AI hub.
- Under Discover an AI capability, select AI models.
- Select Extract custom information from documents, then Create custom model.
- Choose the document type and define the fields, tables and checkboxes to extract. For number fields set the decimal separator, and for dates set the format.
- Create a collection for each distinct layout and upload at least five sample documents per collection. JPG, PNG and PDF files are accepted, and a model can hold up to 200 collections.
- Tag the fields on your samples, select Train, then test with Quick test.
- Publish the model.
Training and testing do not consume AI Builder credits or Copilot Credits. You can check the trained model version under Settings, where Microsoft lists v4.0 and v3.1 of the document intelligence model.
Step 2: Use the model in a flow
Microsoft's walkthrough builds an instant flow with a file input. The action's name changed in May 2025 from Extract information from documents to Process documents.
- In the Power Automate portal, select Create, then Instant cloud flow.
- Choose Manually trigger a flow and select Create.
- In the trigger, select Add an input, then File.
- Select the plus sign after the trigger and choose Process documents.
- Select your model and the document type. The supported types are PDF, JPEG and PNG.
- In the Form field, add File Content from the trigger.
- In later actions, use the extracted fields. For each field there is a value and a confidence score between 0 and 1.
- Save and test.
To receive documents by email instead, trigger on a new Outlook email and pass the attachment content, filtering out inline signature images with a condition that Is Inline equals false. See Save Outlook email attachments to SharePoint with Power Automate for the filtering pattern.
Process only the pages you need
For multi-page documents, open Advanced parameters on the Process documents card and set Pages, for example 1 or 3-5. Microsoft recommends this for large documents that contain only one form because it can reduce prediction cost and improve performance. The page range should contain one unique form; ranges that cut across two forms return partial data.
Step 3: Clean the outputs
AI Builder returns all extracted values as strings. Convert them with expressions before writing them to other systems:
float('<document processing output>')
replace(<document processing output>, '$', '')
formatDateTime(<document processing output>)
- Use
float()for numbers with decimals andint()for whole numbers. - Use
replace()to remove currency symbols or spaces. - Use
formatDateTime()to convert dates. - Checkbox values are Boolean. Use a Condition, or
if(<output>, 'Priority', 'Non-priority'), to map them to text.
When you use a field from a table, the action is automatically placed in an Apply to each loop, so every row is processed. Microsoft's example iterates over an Items table with Quantity, Description and Total columns and writes each line to an Excel table.
Use confidence scores
Add a Condition that compares the confidence score with a threshold, and send low-confidence documents to a human. Microsoft's invoice documentation uses 0.65 in its examples as a threshold for falling back to another model. Choose a value from your own test documents rather than treating that figure as a standard.
Understand the costs
Rates
| Capability | Unit | AI Builder credits | Copilot Credits |
|---|---|---|---|
| Custom document processing | 1 page | 100 | 8 |
| Receipt, invoice, identity document analysis | 1 page | 32 | 8 |
| Text recognition (OCR) | 1 page | 3 | 0.1 |
| Object detection | 1 image | 8 | 8 |
Microsoft's table converts these to money. At pay-as-you-go billing, one Copilot Credit is 0.01 USD, so content processing is 0.08 USD per page. For AI Builder credits, using the yearly prepaid Tier 1 add-on, which gives 1 million credits per month for 500 USD per month, custom document processing is 0.05 USD per page and invoice analysis is 0.016 USD per page.
Estimating monthly use
Multiply pages by the per-page rate.
- 300 invoice pages a month with the prebuilt model: 300 x 32 = 9,600 AI Builder credits, or 300 x 8 = 2,400 Copilot Credits.
- 120 pages a month with a custom model: 120 x 100 = 12,000 AI Builder credits, or 120 x 8 = 960 Copilot Credits.
- A Power Automate Premium licence lists 5,000 AI Builder credits per month in Microsoft's licence table. That covers 156 prebuilt invoice pages, because 5,000 divided by 32 is 156 with a remainder, or 50 custom model pages.
Add the cloud flow run costs if you pay as you go: Microsoft notes that under pay-as-you-go each run is billed through the cloud flow run meter, in addition to AI consumption.
Free actions
Training models, testing prebuilt or custom models, and testing prompts in prompt builder do not consume credits.
Plan for the November 2026 changes
Microsoft's End of AI Builder credits article gives this calendar.
| Date | Change |
|---|---|
| 11/01/2025 | End of sales of AI Builder capacity add-ons for new customers. Existing add-on customers can renew and buy more. AI Builder trials discontinued. |
| 11/01/2026 | End of life of AI Builder capacity add-ons. Existing customers keep credits until their add-ons expire, and should turn off auto-renew. |
| 11/01/2026 | End of life of seeded credits. New or renewed licences like Power Automate Premium do not receive seeded credits. Existing seeded credits are honoured through the end of contract term. |
AI Builder features keep working and use Copilot Credits. In Power Automate and Power Apps, features first try AI Builder credits, then Copilot Credits. There is no automatic conversion between the two currencies, and rates differ per scenario. New customers must buy Copilot Credits, through prepaid packs or pay-as-you-go.
Practical steps:
- Check Licensing, then Capacity add-ons, in the Power Platform admin center for your balance.
- Check contract end dates for seeded credits.
- Estimate monthly pages with the rate table above, and buy or allocate Copilot Credits to cover the maximum monthly use.
- Allocate capacity to the environment that runs the flow, because environments with allocated credits only use allocated credits.
Monitor and govern usage
- The Licensing, Capacity add-ons, Summary tab in the Power Platform admin center shows allocated and consumed credits.
- A consumption report shows credits per day per user per environment.
- The AI Builder Activity page in the Power Automate portal shows each prediction in real time.
- To block use of unallocated AI Builder credits across the tenant, clear Allow users to consume unassigned AI Builder credits.
Consumption data is computed periodically and can lag by several days, so an environment can overshoot before it is blocked. Overage is never charged, and it does not carry into the next month.
Troubleshooting
- EntitlementNotAvailable, NoCapacity, QuotaExceeded or No capacity was found. The environment has no allocated credits and no tenant-level pool. Allocate capacity or buy Copilot Credits, then rerun.
- Process documents action is missing. It was previously called Extract information from documents. Search for either name.
- Wrong or partial data on multi-page files. Set the Pages parameter so the range contains one complete form.
- Signature images are processed as documents. Add the Is Inline equals false condition for Outlook attachments.
-
Numbers fail to write to a destination. Convert strings with
float()orint()and strip currency symbols. - Calls fail in bursts. Stay below 360 calls per environment per 60 seconds for document processing models.
For flow failures in general, use Power Automate flow failed: read run history and fix common errors.
Closing checklist
- Dataverse environment with AI Builder capacity allocated.
- Prebuilt or published custom model chosen.
- Process documents action wired to File Content, with Pages set where useful.
- Outputs converted from strings and checked by confidence score.
- Monthly pages estimated with the rate table.
- Copilot Credits or remaining AI Builder credits planned for after November 1, 2026.
- Monitoring set up in the Power Platform admin center.
References
- Overview of licensing, including the capability rate table: https://learn.microsoft.com/en-us/ai-builder/administer-licensing
- Licensing and AI Builder credits: https://learn.microsoft.com/en-us/ai-builder/credit-management
- Licensing and Copilot Credits: https://learn.microsoft.com/en-us/ai-builder/message-management
- End of AI Builder credits: https://learn.microsoft.com/en-us/ai-builder/endofaibcredits
- Use the document processing model in Power Automate: https://learn.microsoft.com/en-us/ai-builder/form-processing-model-in-flow
- Create a document processing custom model: https://learn.microsoft.com/en-us/ai-builder/create-form-processing-model
- Document processing model overview: https://learn.microsoft.com/en-us/ai-builder/form-processing-model-overview
- Invoice processing prebuilt AI model: https://learn.microsoft.com/en-us/ai-builder/prebuilt-invoice-processing
This guide was researched and drafted with AI assistance and checked against the vendor documentation listed in its References. Read the maintained version and related guides on EpiFive.
Top comments (0)