Train Your Own Document Processing Model in AI Builder

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.

When is a custom model worth it instead of a prebuilt one?

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.

The three model types at a glance

When creating a model, according to the guide to creating a custom model you choose between three document types:

  • Fixed template documents (formerly "structured"): ideal when fields, tables, checkboxes, and signatures always appear in similar positions for a given layout. The model can also be trained on multiple fixed layouts at once and has a short training time.
  • General documents (formerly "unstructured"): suited for documents without a fixed structure or with a complex format. This model type is especially powerful but requires a significantly longer training time.
  • Invoices: extends the existing, prebuilt invoice model with additional fields or with examples of invoices that were not extracted correctly before, instead of training a completely new model.

Requirements for your sample documents

Before you get started, it's worth taking a look at the requirements and limitations for document processing models. The key points from it:

  • Allowed formats are JPG, PNG, and PDF, with text-based PDFs preferable to scanned documents because character recognition is more precise.
  • TIFF files cannot be used for training, but an already trained model can process TIFF files in a Power Automate flow without any issues.
  • A single document may be no larger than 20 MB, and images must be between 50×50 and 10,000×10,000 pixels.
  • Each collection, meaning each distinct layout, requires at least five sample documents, and a model can contain up to 200 collections.
  • In a cloud flow, the limit for taggable fields is 300 per document processing model.
  • German is supported for both fixed template documents and general documents, as are numerous other languages.

Creating, training, and publishing a model

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.

Using the model in Power Automate

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.

Frequently asked questions

How many sample documents do I need at minimum?

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.

What is the difference between fixed template documents and general 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.

Can I extend an existing invoice model instead of training a new one?

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.

Which file formats does the training accept?

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.

How reliable are the extracted values?

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.

About NordFlux

NordFlux UG (haftungsbeschränkt)

NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.

More about us
Free initial analysis

Concrete questions about automation or AI?

In a free initial analysis we discuss your case directly. No strings attached.