Concepts
Step 1: Create a New Flow
Create a new flow in Power Automate and select the trigger that initiates the document processing. For example, you can use the “When a file is created or modified (properties only)” trigger to detect changes in a document library.
Step 2: Add AI Builder Action
Add an action to the flow and search for “AI Builder” in the actions list. Select the “Analyze a document (preview)” action.
Step 3: Establish AI Builder Connection
In the AI Builder action settings, click on the “Add new connection” button to establish a connection with AI Builder. This step is necessary to access AI models and perform document analysis.
Step 4: Select Environment
Once the connection is established, select the environment associated with your AI Builder service. If you haven’t created an environment yet, refer to the AI Builder documentation for instructions on setting up an environment.
Step 5: Configure Document Analysis
Next, configure the AI Builder action by specifying the document you want to analyze. You can choose to analyze a file from SharePoint, OneDrive, or any other cloud storage location supported by Power Automate.
Step 6: Provide Document Details
Provide the necessary details for document processing, such as the file path or URL. You can also specify whether you want the action to output just the document text or extract key-value pairs from the document.
Step 7: Select AI Builder Model
If you want to extract key-value pairs, you need to use an AI Builder model that is trained for entity extraction. In the “Model analysis kind” dropdown, select the relevant model for your document processing needs.
Step 8: Specify Page Range
Optionally, you can limit the output to a specific page range by specifying the page numbers in the “Page range” field. This is useful when dealing with multi-page documents.
Step 9: Add Subsequent Steps
After configuring the AI Builder action, you can add subsequent steps in the flow to perform additional tasks based on the document analysis. For example, you can use conditional statements to check for specific values extracted from the document and trigger different actions accordingly.
Step 10: Test and Save
Save the flow and test it by uploading a document that matches your trigger conditions. Power Automate will automatically analyze the document using the AI Builder model and perform the specified actions based on the analysis results.
Here’s an example of how you can configure document processing using AI Builder in Power Automate:
{
"triggers": {
"When_a_file_is_created_or_modified_properties_only": {
"inputs": {
"host": {
"connectionName": "shared_sharepointonline_12345678",
"operationId": "When_a_file_is_created_or_modified_properties_only"
},
"parameters": {
"folderId": "
"skipToken": "
}
},
"recurrence": {
"frequency": "Minute",
"interval": 15
}
}
},
"actions": {
"Analyze_a_document_(preview)": {
"inputs": {
"host": {
"connectionName": "
"operationId": "Analyze_a_document_(preview)"
},
"parameters": {
"fileUrl": "
"modelAnalysisKind": "
}
}
},
"Condition": {
"actions": {
"If_true": {
"actions": [
{
"method": "GET",
"uri": "
}
],
"expression": "@equals(outputs('Analyze_a_document_(preview)').body.'" +
"
"', '
}
},
"expression": "@contains(toLower(outputs('Analyze_a_document_(preview)').body.text), '
}
}
}
Note: The code above is just an example, and you need to replace the placeholder values with the actual values corresponding to your AI Builder connection, document location, model name, and desired actions.
By following these steps and customizing the flow to your specific requirements, you can configure document processing using AI Builder in Microsoft Power Automate.
Answer the Questions in Comment Section
Which AI Builder component is used to extract key-value pairs from a document?
a) Business Card Reader
b) Form Recognizer
c) Receipt Processing
d) Text Classification
Correct answer: b) Form Recognizer
True or False: AI Builder can be used to automate document processing tasks without writing any code.
Correct answer: True
AI Builder’s Receipt Processing component can extract information such as:
a) Date
b) Total amount
c) Vendor name
d) All of the above
Correct answer: d) All of the above
Which AI Builder component is used for analyzing text and classifying it into predefined categories?
a) Business Card Reader
b) Form Recognizer
c) Text Classification
d) Receipt Processing
Correct answer: c) Text Classification
Which of the following scripting languages can be used to enhance AI Builder models?
a) Python
b) JavaScript
c) Power Automate formulas
d) All of the above
Correct answer: d) All of the above
True or False: AI Builder models can only be trained using labeled data.
Correct answer: False
What is the maximum number of AI Builder models that can be published in a single environment?
a) 3
b) 5
c) 10
d) Unlimited
Correct answer: a) 3
Which AI Builder component is used to extract information from business cards?
a) Business Card Reader
b) Form Recognizer
c) Receipt Processing
d) Text Classification
Correct answer: a) Business Card Reader
True or False: AI Builder models can be consumed in Power Automate flows.
Correct answer: True
Which of the following file formats are supported for document processing with AI Builder?
a) PDF
b) PNG
c) JPEG
d) All of the above
Correct answer: d) All of the above
AI Builder’s Prediction component is used for:
a) Predicting outcomes or making decisions based on historical data
b) Analyzing text sentiments
c) Extracting information from receipts
d) None of the above
Correct answer: a) Predicting outcomes or making decisions based on historical data
True or False: AI Builder can be used to create and train custom models based on specific business requirements.
Correct answer: True
Has anyone successfully used AI Builder for document processing in Power Automate?
I’m struggling with setting up AI Builder models for receipt scanning. Any tips?
How well does AI Builder integrate with existing ERP systems?
This blog post was really helpful! Thanks!
Is data security a concern when using AI Builder for document processing?
I found the accuracy of AI Builder a bit lacking for handwritten documents.
Can AI Builder be used to extract tables from PDFs?
I’m planning to use AI Builder for contract analysis. Is it feasible?