Fatskills
Practice. Master. Repeat.
Study Guide: Cloud ML - Azure AI Engineer Associate (Exam AI-102): Orchestrating AI with Logic Apps, Power Automate, Functions
Source: https://www.fatskills.com/machine-learning-101/chapter/cloud-ml-cert-azure-ai-orchestrating-ai-with-logic-apps-power-automate-functions

Cloud ML - Azure AI Engineer Associate (Exam AI-102): Orchestrating AI with Logic Apps, Power Automate, Functions

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~6 min read

Azure_AI – Orchestrating AI with Logic Apps, Power Automate, Functions


Azure AI-102 Study Guide: Orchestrating AI with Logic Apps, Power Automate, and Functions


What This Is

Orchestrating AI workflows in Azure means connecting AI services (like Cognitive Services, Azure ML, or custom models) with low-code automation tools (Logic Apps, Power Automate) and serverless compute (Azure Functions) to build end-to-end pipelines. A real-world scenario: A retail company uses Azure Form Recognizer to extract invoice data, Logic Apps to route approved invoices to an ERP system, and Azure Functions to trigger a fraud detection model when anomalies are detected—all without writing complex code.


Key Terms & Services

  • Azure Logic Apps
    Microsoft’s low-code/no-code workflow automation service. Best for integrating AI services (e.g., Cognitive Services, Azure ML) with SaaS apps (Dynamics 365, SharePoint) or databases. Uses a drag-and-drop designer and supports 1,000+ connectors.

  • Power Automate (Microsoft Flow)
    A citizen-developer-friendly automation tool (part of Power Platform). Similar to Logic Apps but optimized for business users (e.g., automating approvals, sending notifications). Runs on the same engine but has a simpler UI.

  • Azure Functions
    Serverless compute for running event-driven code (Python, C#, JavaScript). Best for custom logic (e.g., pre/post-processing AI model inputs, calling REST APIs). Supports triggers (HTTP, Blob Storage, Cosmos DB, Event Grid).

  • Azure Event Grid
    A fully managed event routing service that uses a publish-subscribe model. Triggers Logic Apps or Functions when events occur (e.g., a new file in Blob Storage, a model deployment status change).

  • Azure Cognitive Services
    Pre-built AI models (e.g., Text Analytics, Computer Vision, Speech-to-Text) accessible via REST APIs. Often used as steps in Logic Apps/Power Automate workflows.

  • Azure Machine Learning (Azure ML)
    End-to-end ML platform for training, deploying, and managing models. Can be triggered by Logic Apps/Functions (e.g., batch scoring, retraining pipelines).

  • Durable Functions
    An extension of Azure Functions for stateful workflows (e.g., chaining multiple AI steps, human approvals). Solves the "serverless orchestration" problem (e.g., waiting for a human to review a document before processing).

  • Azure Blob Storage Triggers
    A serverless trigger that runs a Function or Logic App when a new blob (file) is uploaded. Common in batch AI pipelines (e.g., processing images for object detection).

  • Custom Connectors
    Extend Logic Apps/Power Automate to call non-Microsoft APIs (e.g., a custom fraud detection model hosted on Azure ML). Requires defining an OpenAPI/Swagger spec.

  • Managed Identity
    A secure way to authenticate Logic Apps/Functions with Azure services (e.g., Key Vault, Cognitive Services) without storing secrets in code.

  • Retry Policies (Logic Apps)
    Configurable rules to handle transient failures (e.g., retry a failed Cognitive Services API call 3 times with exponential backoff).

  • Power Automate Desktop (RPA)
    Robotic Process Automation (RPA) for automating desktop apps (e.g., extracting data from legacy systems to feed into AI models).


Step-by-Step / Process Flow


Scenario: Automate Invoice Processing with AI

Goal: Extract data from invoices (PDFs) using Form Recognizer, validate with a custom fraud model, and route approved invoices to Dynamics 365.


  1. Set Up Storage & Triggers
  2. Create an Azure Blob Storage container for invoices.
  3. Configure a Blob Storage trigger in Logic Apps (or a Blob-triggered Function for custom logic).

  4. Extract Data with Form Recognizer

  5. Add a Form Recognizer action in Logic Apps (or call its REST API from a Function).
  6. Parse extracted fields (vendor, amount, date) into JSON.

  7. Validate with a Custom Fraud Model

  8. Call an Azure ML endpoint (or a Function with custom logic) to score the invoice for fraud.
  9. If fraud score > threshold, send to a human approval step (using Power Automate Approvals).

  10. Route Approved Invoices

  11. Use a Logic Apps "Condition" to check approval status.
  12. If approved, add the invoice to Dynamics 365 (using the Dynamics 365 connector).

  13. Handle Errors & Notifications

  14. Add a retry policy for transient failures (e.g., Form Recognizer API throttling).
  15. Send a Teams/Email notification (via Office 365 Outlook connector) if processing fails.

  16. Monitor & Log

  17. Enable Azure Monitor Logs for Logic Apps/Functions.
  18. Set up alerts for failed runs (e.g., "Invoice processing failed 3 times in 1 hour").

Common Mistakes

Mistake Correction
Using Power Automate for complex AI orchestration Power Automate is great for business users, but Logic Apps is better for enterprise-scale AI workflows (more connectors, better error handling).
Hardcoding API keys in Logic Apps/Functions Use Managed Identity or Azure Key Vault to securely authenticate with Cognitive Services/Azure ML.
Ignoring retry policies for AI APIs Cognitive Services APIs can throttle requests. Always configure retry policies (e.g., 3 retries with exponential backoff).
Using Azure Functions for long-running workflows Functions have a 10-minute timeout (Consumption Plan). For long-running AI pipelines, use Durable Functions or Logic Apps.
Not handling large file processing For large files (e.g., 100MB+ PDFs), use Azure Functions with Blob Storage triggers (not Logic Apps, which has payload limits).


Certification Exam Insights


What the AI-102 Exam Tests

  1. Service Selection Traps
  2. "When to use Logic Apps vs. Power Automate vs. Functions"


    • Logic Apps: Best for enterprise AI workflows (e.g., integrating Azure ML with Dynamics 365).
    • Power Automate: Best for business users (e.g., automating approvals in Teams).
    • Azure Functions: Best for custom code (e.g., pre-processing data before calling Cognitive Services).
  3. Trigger & Event Handling

  4. Know the differences between triggers:


    • Blob Storage Trigger (for files) vs. Event Grid Trigger (for events like model deployment status changes).
    • HTTP Trigger (for REST APIs) vs. Timer Trigger (for scheduled batch jobs).
  5. Security & Authentication

  6. Managed Identity is the preferred way to authenticate (not API keys in code).
  7. Key Vault is required for storing secrets (e.g., Cognitive Services keys).

  8. Error Handling & Retries

  9. Retry policies are critical for AI APIs (e.g., Cognitive Services throttling).
  10. Durable Functions are tested for stateful workflows (e.g., human-in-the-loop approvals).

Quick Check Questions

  1. A healthcare company needs to process patient forms (PDFs) using Form Recognizer, validate data with a custom model, and store results in Cosmos DB. The workflow must handle 10,000+ forms daily with minimal management. Which Azure service should orchestrate this?
  2. Answer: Azure Logic Apps
  3. Explanation: Logic Apps is designed for enterprise-scale workflows with built-in connectors for Form Recognizer, Cosmos DB, and error handling.

  4. A retail company wants to trigger a fraud detection model (hosted on Azure ML) whenever a new transaction is added to a SQL database. The model must run in near real-time. Which trigger should be used?

  5. Answer: SQL Database Trigger (Logic Apps) or Azure Functions with SQL Binding
  6. Explanation: Both can react to new SQL rows, but Logic Apps is simpler for no-code workflows, while Functions offer more control.

  7. A data scientist needs to run a Python script that pre-processes images before sending them to Computer Vision. The script runs for 5 minutes per batch. Which Azure service should they use?

  8. Answer: Azure Functions (Premium Plan) or Durable Functions
  9. Explanation: The Consumption Plan has a 10-minute timeout, but the Premium Plan supports longer runs. Durable Functions are better for stateful workflows.

Last-Minute Cram Sheet

  1. Logic Apps = Enterprise AI workflows (1,000+ connectors, retry policies, monitoring).
  2. Power Automate = Business users (simpler UI, RPA with Power Automate Desktop).
  3. Azure Functions = Custom code (Python/C#/JS, serverless, 10-minute timeout ⚠️).
  4. Durable Functions = Stateful workflows (human approvals, chaining AI steps).
  5. Managed Identity > API keys (secure authentication for Logic Apps/Functions).
  6. Blob Storage Trigger = File processing (e.g., PDFs for Form Recognizer).
  7. Event Grid Trigger = Event-driven AI (e.g., model deployment status changes).
  8. Retry policies are mandatory for Cognitive Services APIs (throttling happens!).
  9. ⚠️ Logic Apps has a 100MB payload limit (use Functions for large files).
  10. ⚠️ Power Automate has a 30-day run limit (Logic Apps supports longer workflows).


ADVERTISEMENT