This article outlines an intelligent document‑classification solution that automatically distinguishes Invoice and Non‑Invoice documents using Microsoft AI Builder integrated with Power Automate. The goal is to streamline document routing, reduce manual review, and enable downstream automation for finance operations.

System Overview

ComponentRoleKey Features
AI Builder Document Classification ModelCore IntelligenceTrained on labeled invoice/non‑invoice samples; returns prediction and confidence score
Power Automate FlowOrchestration layerTriggers on document upload; invokes AI Builder; applies conditional logic
SharePoint / DataverseStorage and metadataStores documents, classification results, and audit trail
Power BI DashboardMonitoringTracks classification accuracy, confidence trends, and workflow performance
Copilot_20260707_210452

Implementation Steps

1. AI Builder Model

2. Dataverse / SharePoint Storage

3. Power Automate Flow

Trigger Options:

Flow Steps

  1. Input Document

    • Get file content from SharePoint/Dataverse.

  2. Call AI Builder Model

    • Use AI Builder – Classify documents action.

    • Pass the file content to the trained model.

  3. Process Output

    • Model returns:

      • Predicted Category (Invoice / Non‑Invoice)

      • Confidence Score

  4. Conditional Logic

    • If Invoice:

      • Move to "Invoices" folder or update Dataverse record.

      • Trigger downstream workflows (e.g., extract invoice data, send to Finance).

    • If Non‑Invoice:

      • Move to "Other Documents" folder.

      • Optionally notify or archive.

  5. Notifications

    • Send email/Teams alert with classification result and confidence score.

Example Flow (Step-by-Step)

  1. Trigger: File uploaded to SharePoint → "Invoices-Processing" library.

  2. Action: AI Builder → Classify document.

  3. Condition:

    • If result = "Invoice" → Move to "Invoices" library.

    • Else → Move to "Non-Invoices" library.

  4. Update Metadata: Add classification result + confidence score.

  5. Notify: Email Finance team with document details.

Benefits

Future Enhancements