top of page

Three Layers of AI in an Azure Workflow

  • Writer: MacSmithAI
    MacSmithAI
  • 6 days ago
  • 6 min read

The last post walked through Power Automate cloud flows for Outlook automation from a Mac, and used Copilot in one place — to draft a flow from a natural-language description. Azure Logic Apps, which is the larger sibling of Power Automate, lets AI show up in three different places. It can write the workflow for you. It can be a step inside the workflow. And at the new edge of the platform, it can be the thing running the workflow.

Each of those is a different tool with a different job, and picking the right layer is most of the battle. Here is how the three map onto the same kind of email-automation work the previous post covered.


Layer 1: AI builds the workflow


This is Copilot in the Logic Apps designer. Open a Standard logic app, hit the Copilot button on the Azure portal toolbar, and describe what you want in English: "Trigger when an email arrives in Outlook with attachments from a specific sender, save the attachments to a SharePoint folder, and post a notification to the finance channel in Teams." Copilot drafts the workflow with the right trigger and actions, leaves you to fill in the connection details, and you save.


This is the same job Power Automate's Copilot does. The reason to do it in Azure instead is everything else Logic Apps gives you alongside it — source control on Standard workflow files, deployment via Bicep or Terraform, Azure RBAC on the resource, integration with the rest of your subscription. If the flow is going to live inside a corporate environment with governance requirements, Logic Apps is the right home. If it is a personal automation, Power Automate is fine.


Layer 1 is the easiest of the three to use and the least transformative. It speeds up building, but what it builds is still a standard rule-based flow.


Layer 2: AI is a step inside the workflow


This is where workflows start doing things they couldn't do before. Logic Apps has built-in connectors for Azure OpenAI and Azure AI Search, which means you can drop an LLM call into the middle of a flow the same way you would drop a "send email" action.

Concrete email-automation patterns this opens up:


  • Email classifier. Trigger on a new email. Send the subject and body to Azure OpenAI with a prompt that asks for one of your categories — "billing," "support," "sales," "noise." Branch the workflow on the response. No training data, no AI Builder credits, just a prompt.

  • Auto-summarizer. A long email comes in. Pass the body through gpt-4o-mini with a "summarize in three bullet points" prompt. Push the summary to Teams or Slack alongside a link to the original message.

  • Draft reply generator. New message arrives. Combine the body with the sender's prior email history (pulled from Microsoft Graph) and ask the model to draft a reply in your voice. Save it to Outlook as a Drafts-folder item for you to review before sending.

  • RAG over a knowledge base. When a support email arrives, query Azure AI Search against your documentation, pass the relevant chunks plus the question to the LLM, and get a grounded draft answer back.


You need an Azure OpenAI deployment for any of this. Provision the resource, deploy a model — gpt-4o-mini is the usual workhorse for cost reasons — and point the Logic Apps connector at it. The Azure AI Search connector handles the retrieval side if you want grounding.


Model usage shows up on your Azure bill as token consumption against the OpenAI deployment. That is a real cost line for high-volume flows. Budget accordingly.


Layer 3: AI runs the workflow


The newest piece and the most different from anything Power Automate offers today.

Agent Loop — labeled Autonomous Agents in the workflow type picker — is a workflow shape where you do not define the steps in order. You define:


  • The goal (instructions to the agent, written as a system prompt)

  • The tools (groups of connector actions the agent is allowed to use)

  • The trigger (what kicks off the agent)


The agent, backed by an Azure OpenAI model (gpt-4o-mini or gpt-5o-mini for Consumption autonomous workflows, depending on region), runs a Think → Act → Learn loop. It reads the goal, decides which tool to use next, calls it, reads the result, decides the next step. Same agentic pattern you would see in any modern AI agent framework, except hosted as a Logic App with the full 1,400-connector library available as tools.

For email automation, this looks like:

"You are an agent that processes incoming customer emails. When an email arrives, classify it. If it is a refund request, look up the customer in Dynamics 365, check whether they are eligible based on our policy, draft a reply, and send it. If the case is complex, escalate to the support queue in Teams and notify the on-call manager. Always log the decision and your reasoning to SharePoint."

You provide the instructions and the tools (Outlook Get Email, Dynamics 365 Lookup Customer, Outlook Send Email, Teams Post Message, SharePoint Create Item). The agent figures out the sequence per email.


The trade-off is what you would expect: this is the most powerful pattern and the least predictable. It is pay-as-you-go billed on tokens. It can take novel actions you did not explicitly script. You give up the auditability of a deterministic flow. For low-stakes triage it is a clear win. For anything with compliance or money on the line, you want guardrails — tool-level constraints, human-in-the-loop approval at decision points, run history monitoring turned on.


Current state worth knowing:

  • Available in both Consumption and Standard tiers

  • Built on Semantic Kernel under the hood

  • Supported models are a small set per region — check the current list before you commit to a model

  • Still in preview in some regions, generally available in others


Which layer matches which problem


A short decision tree:

  • You want to build flows faster. Layer 1, Copilot in the designer. Same flow you would write by hand, drafted from a prompt.

  • You want flows that understand content, not just metadata. Layer 2, Azure OpenAI connector inside an otherwise normal Logic App. Deterministic structure, AI inside one or two steps.

  • You want a workflow that decides what to do. Layer 3, Agent Loop. Goal plus tools, the LLM figures out the rest.


Most production work I see today lives in Layer 2. It is powerful enough to handle the interesting work — classification, summarization, drafting — without giving up the predictability of a defined sequence. Agent Loop is the right answer for unstructured triage where the workflow itself has to adapt per input.


Cost reality


The thing to internalize: every Layer 2 and Layer 3 step that hits a model costs tokens. A Logic App that runs a thousand times a day and calls gpt-4o-mini on each run is not free. It is not expensive at low scale — fractions of a cent per call — but at high scale it grows faster than the per-flow Power Automate license model.

Run an estimate before you scale. The Azure pricing calculator covers OpenAI deployments. Set a budget alert on the OpenAI resource so a runaway flow does not run away with your wallet.


All of this works from a Mac

All three layers run in Azure, which means all three are accessible from any device with a browser. The Azure portal, the Logic Apps designer, the OpenAI Studio, the AI Foundry interface — all of it works in Safari on macOS. The only Microsoft AI workflow tool that still requires Windows is Power Automate Desktop, which does not enter this picture.

For the heavier developer-flavored work in Layer 3, you will probably want to develop locally with the Azure Logic Apps (Standard) extension for VS Code. That extension supports Standard workflow files (.workflow.json) on macOS. Write the workflow as code, source-control it, deploy it through your Azure CLI pipeline, and operate it from the portal. Mac is fully supported for this path.


Where to start


If you have already built one Power Automate flow following the previous post, the next experiment is Layer 2 in Logic Apps. Provision an Azure OpenAI deployment with gpt-4o-mini. Create a Standard logic app. Take the email-classification idea from the AI Builder section of the previous post and rebuild it with an Azure OpenAI step in the middle that reads the email body and returns the category. You will see quickly why Layer 2 is where most of the production work lives.


Once that one runs, Agent Loop is the experiment after. Same idea, different shape — you stop scripting the steps and start writing the agent's instructions.

Comments


bottom of page