Share via

Power Automate + Azure for Order Processing and Document Matching in Manufacturing

Ulrika Andreasen 0 Reputation points
2026-06-03T06:07:30.5833333+00:00

I have built a Power Automate solution for a shared mailbox in manufacturing. It classifies emails such as orders, order confirmations, delivery notices and invoices using SharePoint rule tables.

I am now evaluating Azure for:

  • extracting order numbers from emails and PDF attachments
  • matching orders with order confirmations, delivery notices and invoices
  • document understanding and AI-based classification

Which Azure services would you recommend for a scalable architecture? Azure Functions, Azure AI Document Intelligence, Azure OpenAI, or another approach?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Siddhesh Desai 7,160 Reputation points Microsoft External Staff Moderator
    2026-06-03T07:06:16.1033333+00:00

    Hi @Ulrika Andreasen

    Thank you for reaching out to Microsoft Q&A.

    The current approach using Power Automate with rule-based classification works well for basic email routing; however, it has limitations when scaling to enterprise manufacturing scenarios where documents vary in format (orders, confirmations, invoices, delivery notes) and may not follow consistent templates. Additionally, extracting order numbers and matching documents across different communication types requires structured data extraction and correlation logic, which Power Automate alone cannot efficiently handle. This leads to challenges such as inaccurate extraction, difficulty in handling PDF attachments, and lack of robust matching between related documents. To address these gaps, Azure provides an end-to-end scalable architecture that combines document AI, serverless processing, and event-driven workflows to automate extraction, classification, and intelligent matching of documents.

    Refer below points to resolve this issue or this is the workaround

    Use Azure AI Document Intelligence for extraction of order data

    Azure AI Document Intelligence is designed to extract structured information such as key-value pairs, tables, and layout from documents like invoices, orders, and confirmations. This enables reliable extraction of order numbers, vendor details, and amounts from PDFs and email content.

    • Use prebuilt invoice models for standard documents
    • Train custom models for your manufacturing-specific formats
    • Output is structured JSON, which can be easily used for matching

    Use Azure Functions (Durable Functions) for workflow orchestration and matching logic

    Azure Functions act as the processing layer that handles document extraction results and performs matching logic.

    • Trigger functions when a document is uploaded or email is received
    • Store extracted data in a database
    • Implement matching logic using:
      • Order number
        • Vendor name
          • Date / amount

    Example pseudo logic:

    if invoice.orderId == order.orderId:
        status = "Matched"
    elif fuzzy_match(invoice.vendor, order.vendor):
        status = "Probable Match"
    else:
        status = "Unmatched"
    

    Durable Functions help maintain state across multi-step workflows like order → confirmation → delivery → invoice.

    Use Azure Storage (Blob Storage) to store emails and attachments

    Instead of processing documents directly in Power Automate, store all incoming emails and attachments in Blob Storage.

    • Acts as a centralized document repository
    • Enables reprocessing and auditing
    • Triggers Azure processing pipeline

    Use Azure Service Bus or Event Grid for scalable event-driven processing

    For high-volume manufacturing scenarios, event-driven architecture is critical.

    • Push document processing events to a queue
    • Azure Functions consume messages asynchronously
    • Enables retry, buffering, and decoupling

    This ensures your system can handle spikes in incoming orders without failure.

    Use Azure OpenAI for advanced document matching and reasoning.

    For cases where:

    • Order numbers are missing
    • Documents have different formats
    • Matching requires semantic understanding

    Azure OpenAI can analyze and compare extracted content. Example use cases:

    • "Find the best matching order for this invoice"
    • Detect inconsistencies between order and invoice

    Use a Database (Azure SQL or Cosmos DB) to store extracted and matched data

    Store all structured data to enable querying and tracking.

    • Maintain relationships between documents
    • Track status (matched / unmatched / pending)
    • Enable reporting dashboards

    Upgrade classification using AI instead of static rule tables

    Your current SharePoint rule tables can be replaced or enhanced with AI-based classification:

    • Use Document Intelligence for document-type classification
    • Use OpenAI for email content classification (orders vs invoices vs confirmations)

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-06-03T06:08:06.44+00:00

    A scalable architecture for this scenario combines Power Automate with Azure serverless and AI services that are already proven for document processing and classification.

    Recommended high-level architecture

    1. Ingestion and orchestration
      • Keep Power Automate as the entry point for the shared mailbox (trigger on new emails).
      • Use Azure Functions as the event-driven backend to:
        • Receive email metadata and attachments from Power Automate.
        • Orchestrate calls to AI services for extraction, matching, and classification.
      • For higher scale and decoupling, introduce Azure Service Bus between Power Automate and Azure Functions so that Functions process messages asynchronously. This pattern is used in the “Automate document classification in Azure” architecture, where Service Bus triggers durable function instances.
    2. Document extraction and understanding
      • Use Azure AI Document Intelligence for:
        • OCR and text extraction from PDF attachments (orders, confirmations, delivery notes, invoices).
        • Extracting structured content such as tables, headers, and key fields (order numbers, dates, amounts) using prebuilt or layout/read models.
      • This aligns with guidance that Document Intelligence is used to extract insights from documents and images and to identify key structures like headers and document sections.
    3. AI-based classification and matching
      • For deterministic extraction of known fields (order numbers, vendor IDs, etc.), rely primarily on Azure Document Intelligence, which is recommended for high-volume, structured or semi-structured documents.
      • For more flexible, AI-based classification (e.g., deciding whether a document is an order, confirmation, delivery notice, or invoice) and for semantic matching between documents:
        • Use Azure OpenAI models hosted via Microsoft Foundry.
        • Use Semantic Kernel in an Azure Functions backend to:
          • Generate embeddings for document content and metadata.
          • Store embeddings in Azure AI Search vector storage.
          • Run retrieval-augmented generation (RAG) or similarity search to match orders with confirmations, delivery notices, and invoices.
      • This pattern mirrors the “Automate document classification in Azure” architecture, where:
        • Document Intelligence performs analysis and extraction.
        • Semantic Kernel creates embeddings.
        • AI Search vector storage indexes those embeddings.
        • Foundry deploys an Azure OpenAI model for downstream NLP and RAG.
    4. Search and matching store
      • Use Azure AI Search as the central store for:
        • Indexed text and metadata from Document Intelligence.
        • Vector embeddings for semantic search and matching.
      • This enables scenarios such as:
        • Given an order email, find matching confirmations, delivery notices, and invoices by order number and semantic similarity.
        • Support downstream search and reporting from Power Apps or other front ends.
    5. Front-end and integration with existing Power Automate solution
      • Keep SharePoint as the rule/configuration store and document repository.
      • Optionally add an App Service–hosted web app for:
        • Monitoring processing status.
        • Manual review of unmatched or low-confidence documents.
      • Power Automate can:
        • Trigger the Azure Functions pipeline.
        • Update SharePoint lists/libraries with extracted fields and matching results.
    6. Scalability and cost considerations
      • Use Azure Functions with durable functions for orchestration of multi-step pipelines (ingestion → extraction → classification → matching → write-back). The referenced architecture uses durable functions for scalable document-processing pipelines.
      • For Azure OpenAI via Foundry:
        • Start with Standard deployment types (e.g., Global Standard) for exploratory and bursty workloads.
        • Move critical, predictable workloads to Provisioned deployment types (e.g., Global Provisioned) for consistent latency and cost optimization.
      • Optimize AI Search by tuning partitions, replicas, and schema to balance performance and cost.
      • Major cost drivers in this architecture are:
        • Model inference usage via Foundry (Azure OpenAI or other models).
        • Document ingestion and processing via Document Intelligence.
        • Indexing and search consumption via AI Search.

    Summary of recommended services

    • Power Automate: Email trigger and integration with the shared mailbox and SharePoint.
    • Azure Functions (with durable functions): Orchestrate the end-to-end processing pipeline.
    • Azure Service Bus: Optional but recommended for decoupled, scalable message-based processing.
    • Azure AI Document Intelligence: Extract order numbers and other key fields from emails/PDFs and understand document structure.
    • Microsoft Foundry + Azure OpenAI: AI-based classification and semantic matching.
    • Semantic Kernel: Embedding generation and integration with LLMs.
    • Azure AI Search (including vector storage): Indexing, search, and semantic matching across all documents.
    • Azure App Service (optional): Web front end for monitoring and manual review.

    This combination matches the documented patterns for automating document classification and for integrating Azure with Power Platform for AI-driven document processing.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.