How to call Azure AI document intelligent from Powwer automate

Le Duy Khanh 40 Reputation points
2025-11-13T02:55:20.0633333+00:00

Hi all expert members in the community. Now I am trying to Azure AI documentation (custom model) to extract information form PDF file and auto comparing to standard which one save on onedrive, to auto generate inform that Pass or failed sample (results received via E mail). I have already finished training the Azure model, I am moving to the next steps, but when I try to call a connector Azure AI document in power automate, It was not found, but I was also looking for this way on Youtube, about 3 months ago, it still worked as the attached picture.

So please you help me, teach me which name of the Azure Document intelligent now to connect in power automate, or is there other way to connect this custom model in power automate with easiest way.

User's image

Thank you in advance

Azure Document Intelligence in Foundry Tools
0 comments No comments

Answer accepted by question author
Jerald Felix 18,680 Reputation points Volunteer Moderator
2025-11-13T04:05:59.4133333+00:00

Hello Le Duy Khanh,

The Azure AI Document Intelligence connector (previously Form Recognizer) is still available in Power Automate, but it's listed under the new name "Azure AI Document Intelligence (form recognizer)"—search for that exactly in the connectors panel, or look under AI Builder > Document processing for prebuilt options. For custom models like yours (trained for PDF extraction and comparison), the built-in connector supports model IDs, but if it's not appearing or failing, the easiest integration is via HTTP actions calling the REST API directly—no extra custom connector needed. This works seamlessly with Power Automate's premium license and lets you pull extracted data for comparison against your OneDrive standard file, then email results (Pass/Fail).

Step 1: Verify/Find the Connector

  • In Power Automate > Create flow > Search "Azure AI Document Intelligence" or "Form Recognizer"—if missing, ensure your environment has AI Builder enabled (Admin center > Environments > Your env > Settings > Features > AI Builder > Turn on).
  • If still not there: Use the HTTP action (premium) for API calls—more flexible for custom models anyway.

Step 2: Set Up Your Flow for Custom Model Integration

Create an instant/manual cloud flow or trigger on file upload (e.g., "When a file is created in OneDrive/SharePoint").

  1. Get Document Intelligence Resource Details:
    • In Azure portal > Your Document Intelligence resource > Keys and Endpoint > Copy Key 1 and Endpoint (e.g., https://your-region.cognitiveservices.azure.com/).
    • Note your custom model ID from Document Intelligence Studio (Models tab > Copy ID, e.g., "custom-model-123").
  2. Add HTTP Action for Analyze (Extract Data from PDF):
    • Add action: HTTP (premium connector).
    • Method: POST
    • URI: {endpoint}/documentintelligence/documentModels/{modelId}:analyze?api-version=2024-07-31-preview
      • Replace {endpoint} with yours, {modelId} with custom model ID.
    • Headers:
      
           Ocp-Apim-Subscription-Key: {your-key}
      
           Content-Type: application/json
      
      
    • Body (for PDF file from OneDrive/SharePoint):
      
           {
      
             "urlSource": "https://your-onedrive-link-to-pdf.pdf"
      
           }
      
      
      • Or for file content: Use "base64Source" with file bytes (get via "Get file content" action first).
    • This starts async analysis—response gives Operation-Location header with poll URL.
  3. Poll for Results:
    • Add Compose action: outputs('HTTP')?['headers']?['Operation-Location'] (gets poll URL).
    • Add Do until loop: Condition: body('HTTP_2')?['status'] equals "succeeded" (limit 60 iterations, 10s delay).
      • Inside loop: HTTP action to poll URL (GET method, same key header).
      • Parse JSON on response: Schema from sample (include "analyzeResult" with fields like your custom extractions).
    • Output: Extracted data in body('HTTP_2')?['analyzeResult']?['documents'][0]?['fields'].
  4. Compare to Standard File:
    • Add Get file content from OneDrive (your standard PDF).
    • Use HTTP again to analyze the standard with same model (repeat Steps 2-3).
    • Compare: Use Compose or condition—e.g., for key fields like "Amount" or "Date":
      
           equals(outputs('Extracted_Amount'), outputs('Standard_Amount'))
      
      
      • For complex comparison (e.g., tolerance): Use expressions like float(outputs('Extracted')) vs. float(outputs('Standard')) with greaterOrEquals.
    • Set variable: Pass/Fail based on matches (e.g., if all critical fields match: "Pass").
  5. Send Email Results:
    • Add Send an email (V2) (Outlook/Office 365 connector).
    • Body: "PDF Analysis: [Pass/Fail]. Differences: [list mismatches]. Attached: Original PDF."
    • Attachments: Add the input PDF and extracted JSON (Compose as file).

Full Example Flow Structure

  • Trigger: Manual or "When file created" (OneDrive/SharePoint).
  • Get file content (input PDF bytes).
  • HTTP (Analyze custom model)—Body: {"base64Source": base64(body('Get_file_content'))}.
  • Compose (Poll URL from headers).
  • Do until (Poll for success).
  • Parse JSON (results schema).
  • HTTP (Analyze standard file from OneDrive).
  • Condition (Compare extracted fields).
  • Send email (Results with attachments).

Tips for Success

  • API Version: Use 2024-07-31-preview for custom models—supports better PDF handling.
  • File Limits: Custom models handle up to 500 pages/500 MB; test with small PDFs first.
  • Error Handling: Add scopes for "Try/Catch" (Compose with if(empty(extracted), "Error")).
  • Costs: ~$1/1,000 pages (S0 tier); free F0 for testing (500 pages/month).
  • Debug: In flow run history > Peek code > Test individual HTTP actions. If 404 on model, verify ID in Studio.
  • Alternative if Stuck: Use AI Builder's "Document processing" model (train custom there)—native Power Automate action, no HTTP needed, but less flexible than Azure.

This API method is reliable and free-form—run a test flow with your model ID for quick validation. If auth/key issues pop up, share error details for tweaks.

Best Regards,

Jerald Felix

Was this answer helpful?

1 person found this answer helpful.

Answer accepted by question author
Anshika Varshney 15,535 Reputation points Microsoft External Staff Moderator
2025-11-13T08:32:54.8866667+00:00

Hello Le Duy Khanh,

Thanks for posting your question. yes, you can call Azure AI Document Intelligence (formerly Form Recognizer) from Power Automate but depending on your scenario (custom model vs pre-built) you may need to use the HTTP action rather than relying purely on the built-in connector.

How to integrate:

  1. If you see the connector (“Azure AI Document Intelligence (form recognizer)”) in Power Automate: go to Create flow → Add new step → Search connectors → “Azure AI Document Intelligence (form recognizer)”. The docs show it’s available in Power Automate. https://learn.microsoft.com/en-us/connectors/formrecognizer/?utm_source=chatgpt.com

2.For a custom model (PDF extraction + comparison), if the connector isn’t suitable or visible: use HTTP action (premium) in Power Automate:

  • POST to your Document Intelligence endpoint (e.g., https://<your-resource>.cognitiveservices.azure.com/documentModels/{modelId}:analyze?api-version=2024-07-31-preview)
  • Use headers: Ocp-Apim-Subscription-Key (or managed identity) etc. never-stop-learning.de

3.After you get the analysis result, parse the JSON of extracted data, then you can compare it (e.g., against a standard PDF from OneDrive or SharePoint) and trigger further steps (email, status update etc). The article from C# Corner walks through this low-code flow. C# Corner

You need to check below things:

  • Ensure your Power Automate environment has AI Builder / custom connector support if using custom models.
  • Make sure your resource’s endpoint and model ID are correct. If you trained a custom model in Document Intelligence Studio, copy the exact model ID.
  • Confirm licensing/connector availability: some features may require “premium” connector or paid tier of Power Automate.
  • If the built-in connector doesn’t show up or supports only prebuilt models, the HTTP approach is a reliable fallback.

I hope this has been helpful! If you need any further assistance or run into any issues during the cleanup, please don’t hesitate to reach out I’ll be happy to help.

Was this answer helpful?


0 additional answers

Sort by: Most 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.