AI-powered document processing from Power Pages

Loading

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

ComponentFunction
Power PagesFront-end UI for file upload
Power AutomateWorkflow that processes the uploaded file
AI BuilderPre-trained or custom AI models to extract document data
DataverseStores extracted and processed information
Power Apps Portal Web RolesControls access and permissions

3. Step-by-Step Implementation


Step 1: Set Up the AI Model (AI Builder)

  1. Go to make.powerapps.com
  2. Navigate to AI Builder > Explore > Form Processing
  3. 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 NameData TypeExample
DocumentNameTextinvoice123.pdf
UploadedByLookup (User)User reference
ExtractedDateDateAuto-populated
Field1_ValueTextCustomer Name
Field2_ValueCurrencyInvoice 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:

  1. Get file content
  2. Run AI Builder model on the document
  3. Parse and map extracted fields
  4. Create a record in Dataverse with extracted info
  5. (Optional) Send an email summary or approval workflow

Step 4: Power Pages – Enable Document Upload

  1. Add a Basic Form or Custom Page
  2. Insert a file upload control (either HTML input or Entity Form Attachment control)
  3. Bind it to the appropriate Dataverse table or trigger point
  4. 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

  1. Vendor uploads invoice via Power Pages form
  2. Power Automate flow runs AI Builder model
  3. Extracts:
    • Vendor Name
    • Invoice Total
    • Due Date
  4. Creates a record in VendorInvoices table
  5. Emails the Accounts team for approval
  6. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *