AI-powered document processing allows users of Power Pages to upload documents (PDFs, Word files, images, etc.) and extract structured data, text, or insights using AI Builder, Power Automate, and Dataverse. This is especially powerful for scenarios like form submissions, invoice processing, ID verification, and content extraction for CRM records.
1. Use Case Scenarios
Before diving into setup, here are common real-world scenarios where AI-powered document processing adds value:
- Users upload invoices → extract vendor, amount, due date
- Visitors submit ID proofs → extract name, DOB, and match to records
- Clients provide signed forms → extract key fields to auto-fill case records
- Students upload assignments or reports → scan for summaries or key points
- Partners submit certificates → check validity and trigger workflows
2. Architecture Overview
Component | Function |
---|---|
Power Pages | Front-end UI for file upload |
Power Automate | Workflow that processes the uploaded file |
AI Builder | Pre-trained or custom AI models to extract document data |
Dataverse | Stores extracted and processed information |
Power Apps Portal Web Roles | Controls access and permissions |
3. Step-by-Step Implementation
Step 1: Set Up the AI Model (AI Builder)
- Go to make.powerapps.com
- Navigate to AI Builder > Explore > Form Processing
- Click Create and follow the steps:
- Upload sample documents (PDF, image, etc.)
- Train the model to recognize specific fields (e.g., Name, Invoice Total, Date)
- Save and Publish the model
Step 2: Create a Dataverse Table to Store Extracted Data
Create a custom table like DocumentExtractedInfo
:
Column Name | Data Type | Example |
---|---|---|
DocumentName | Text | invoice123.pdf |
UploadedBy | Lookup (User) | User reference |
ExtractedDate | Date | Auto-populated |
Field1_Value | Text | Customer Name |
Field2_Value | Currency | Invoice Total |
Step 3: Build Power Automate Flow to Process Uploads
Trigger:
- When a file is added to Dataverse or SharePoint
- Or use HTTP trigger for more control from Power Pages
Actions:
- Get file content
- Run AI Builder model on the document
- Parse and map extracted fields
- Create a record in Dataverse with extracted info
- (Optional) Send an email summary or approval workflow
Step 4: Power Pages – Enable Document Upload
- Add a Basic Form or Custom Page
- Insert a file upload control (either HTML input or Entity Form Attachment control)
- Bind it to the appropriate Dataverse table or trigger point
- Add an event (button click or auto-submission) to call Power Automate Flow
<form id="uploadForm">
<input type="file" id="docUpload" />
<button type="submit">Upload</button>
</form>
<div id="statusMsg"></div>
<script>
document.getElementById("uploadForm").onsubmit = async function(e) {
e.preventDefault();
const file = document.getElementById("docUpload").files[0];
const formData = new FormData();
formData.append("file", file);
const res = await fetch("YOUR_POWER_AUTOMATE_FLOW_URL", {
method: "POST",
body: formData
});
const data = await res.json();
document.getElementById("statusMsg").innerText = "Upload successful: " + data.status;
};
</script>
Step 5: Secure the Process
- Ensure Web Roles are applied so only authorized users can upload documents
- Store files in a secure Dataverse file column or SharePoint
- Use row-level security to prevent users from viewing others’ data
- Mask or encrypt sensitive fields (e.g., ID number, SSN)
6. Advanced Features and Enhancements
1. Validation & Enrichment
- Use Power Automate to validate extracted data (e.g., check vendor in CRM)
- Add steps to enrich data like currency conversion, risk scoring, or flag anomalies
2. Custom AI Models
- Use Azure AI services or train custom models with Lobe, Azure Custom Vision
- Combine image recognition with text extraction (e.g., passport photo + info)
3. Notification System
- Send real-time notifications when documents are successfully processed
- Trigger Teams, email, or SMS alerts
4. Display Extracted Data
- Use Liquid templates or embedded Web API calls to display results dynamically on the portal
- Or allow users to edit/finalize extracted info before submission
7. Logging & Audit Trail
To ensure transparency and traceability, log:
- File metadata (name, size, uploader)
- AI extraction result
- Time of processing
- User role and action taken
You can maintain an AuditLog
table in Dataverse for this.
8. Use Case Example: Vendor Invoice Processing
- Vendor uploads invoice via Power Pages form
- Power Automate flow runs AI Builder model
- Extracts:
- Vendor Name
- Invoice Total
- Due Date
- Creates a record in
VendorInvoices
table - Emails the Accounts team for approval
- Status updates shown to vendor via portal dashboard
9. Licensing Notes
- AI Builder has credits based on license type
- Monitor usage in Power Platform Admin Center
- File size limits apply: PDFs should be under 20 MB and optimized for OCR
10. Final Thoughts
AI-powered document processing streamlines the interaction between users and business workflows through intelligent automation. Power Pages serves as a powerful interface to handle submissions, while AI Builder and Power Automate handle backend intelligence. Whether it’s forms, compliance docs, or contracts, you can digitize and accelerate business operations with low-code AI and secure processing.