Building Custom Prompts in AI Builder
How to create custom prompts in AI Builder and use them in Power Automate as a reusable AI action.
How to train your own document processing model in AI Builder for company-specific documents and use it in Power Automate.
Invoices look different from every vendor, but AI Builder at least has a ready-made AI model for invoices. For company-specific documents such as internal delivery notes, maintenance logs, custom order forms, or inspection reports, there is no prebuilt model that knows the right fields. That's exactly why AI Builder lets you train your own, custom document processing model that extracts precisely the information your company actually needs, no data science skills required.
This article shows when your own model pays off, which model types are available, what requirements your sample documents must meet, and how to train, publish, and then use the model step by step in a Power Automate flow. The only source used is the official Microsoft documentation for AI Builder.
AI Builder already provides prebuilt models for common document types such as invoices, receipts, business cards, or ID documents. But as soon as your documents have their own layout that no standard model recognizes, for example an internal form, a delivery note with company-specific columns, or a multi-page inspection report, you need a custom model. According to the document processing model overview five sample documents are usually enough to train a model that delivers results tailored to your specific content. You don't need to program fields or build a neural network from scratch, AI Builder handles the training in the background.
When creating a model, according to the guide to creating a custom model you choose between three document types:
Before you get started, it's worth taking a look at the requirements and limitations for document processing models. The key points from it:
The wizard in AI Builder guides you through the entire process, according to Microsoft:
1. Sign in to Power Apps or Power Automate and open More > AI Hub in the left pane.
2. Under Discover an AI capability select the option AI models, then Extract custom information from documents and then select Create a custom model.
3. Define the document type (fixed template, general documents, or invoices) and specify the fields, tables, and checkboxes to extract.
4. Create a collection for each layout and upload at least five sample documents. Then mark in the samples which text passages belong to which field.
5. Click Train. Once training is complete, you can test the model directly via Quick test with another document before you publish it and release it for production use.
You use a published model in a cloud flow via the Process documents action, which, according to the guide to using it in Power Automate has been called that since May 2025 and was previously called Extract information from documents. You select your model and the matching document type, link the file content from your trigger in the Form field, and can optionally specify a specific page range in the Pages parameter, for example for large multi-page documents with only one relevant form. In the following steps, all extracted fields are available to you as {Field name} Value, each with a confidence score between 0 and 1, which lets you automatically route uncertain extractions to a manual review.
For further processing, a few expressions suggested directly by Microsoft in the documentation are helpful: `replace()` removes currency symbols or spaces, `int()` and `float()` respectively convert extracted strings into numbers, and `formatDateTime()` brings date values into the desired format. For incoming emails via the Outlook connector, it's also worth adding a condition that filters out inline embedded signatures using the Attachments Is Inline attribute, so they aren't accidentally processed as a document.
If you want to embed your own model cleanly into existing approval or accounting processes, a Power Automate consulting from NordFlux can help align training data, field structure, and downstream process from the start. You retain control over which documents run through automatically and which are routed for review.
For each collection, meaning each distinct layout, AI Builder requires at least five sample documents in JPG, PNG, or PDF format. More examples with realistic variance in how they're filled out and in image quality generally noticeably improve recognition accuracy, especially for handwritten or scanned documents.
Fixed template documents are suited for documents where fields always appear in a similar position within a layout, so training is correspondingly fast. General documents are intended for documents without a fixed layout or with a complex structure, but they come with a significantly longer training time because the model has to respond more flexibly to changing structures.
Yes. Via the Invoices option you extend the prebuilt invoice model with additional fields or with examples of invoices that were previously extracted incorrectly. This is usually faster than training a completely new model of type fixed template documents or general documents.
Allowed are JPG, PNG, and PDF, with text-embedded PDFs delivering better results than scanned images. TIFF files cannot be used for training, but an already trained model can process them later in a Power Automate flow without any issues.
Every extracted field provides a confidence score between 0 and 1 in addition to the value. Values close to 1 indicate a high reliability of the prediction. In practice, it's worth automatically triggering a manual review above a defined threshold instead of blindly trusting every extracted value.
NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.
How to create custom prompts in AI Builder and use them in Power Automate as a reusable AI action.
AI Builder automatically extracts invoice data in Power Automate. How the model works, what it costs in credits and which Premium license you need.
Company-specific document formats often cannot be read reliably by prebuilt AI Builder models, while a custom-trained model requires clean sample data and testing effort. NordFlux supports AI readiness for mid-sized companies from data selection through to productive integration in Power Automate. In the first conversation we review your documents and show whether a custom model is worth it.