Azure Logic Apps: The Complete Advanced Guide
A book-style walk through Microsoft's cloud service for building automated workflows: how triggers, actions, and connectors fit together, how to choose between Consumption and Standard, how to handle errors, security, networking, and scale, how AI agent workflows work, and how to keep cost and change under control.
Imagine a very reliable office assistant. When an invoice email arrives, the assistant saves the attachment, reads the amount, asks a manager to approve it if it is large, updates the finance system, and sends a confirmation. The assistant never gets tired, never forgets a step, and writes down everything it did. Doing this by hand across hundreds of messages a day would be slow and error-prone. Azure Logic Apps is that assistant for software. You describe the steps once as a workflow, connect it to the systems involved, and the service runs it every time the starting event happens, without you managing servers.
In this guide we go well beyond the basics. We will learn what a workflow is made of, how the two main hosting models differ, how connectors reach hundreds of systems, and how to build reliable flows that retry, wait, and recover. We will study security, networking, deployment, monitoring, scaling limits, enterprise integration, and the new agent workflows that bring AI into automation. Every new term is explained when we first meet it, with everyday pictures to keep ideas simple.
1What Azure Logic Apps Really Is
Before settings and diagrams, we need a clear picture of what kind of service this is, and where it fits among Azure’s many ways to run logic.
The short definition
Azure Logic Apps is a cloud service for creating and running automated workflows that connect apps, data, services, and systems. A workflow is a series of steps that starts with one trigger, which is the event that begins a run, and then performs actions, which are the steps that do the work. Logic Apps belongs to the family called integration platform as a service, meaning that Microsoft runs the platform, the scaling, and the patching, while you focus on the flow of business logic.
Two things make it special. First, it is designed with a visual designer, so many workflows can be built by dragging steps rather than writing programs. Second, it offers a very large catalogue of connectors, prebuilt pieces that talk to services such as email systems, databases, queues, storage, enterprise applications, social media, and software-as-a-service products. You can often connect two systems in minutes without learning either one’s programming interface.
Think of a train timetable with stations and connecting platforms. The trigger is the departure bell, each action is a station where something happens, and connectors are the rails that join stations belonging to different companies. You do not build the rails or the trains. You decide the route and what happens at each stop.
What kinds of work suit it
Logic Apps is a strong fit when the job is to move, transform, or react to data across systems: processing messages from queues, syncing records between a customer system and a database, sending approvals and notifications, receiving files from partners, calling web interfaces on a schedule, or orchestrating several steps with waits and decisions. It also handles long-running processes, since a workflow can pause for days while waiting for an approval or a reply, without holding a server.
What it is not
Logic Apps is not a general programming platform. Heavy calculation, complex algorithms, and very low-latency request handling belong in code, for example in Azure Functions or a web application. Logic Apps can call such code, and the two are often used together. It is also not a database or a message broker, though it works closely with them. And it is not the same as Power Automate, which is built on the same ideas but is aimed at business users inside Microsoft 365 and the Power Platform, while Logic Apps is aimed at developers and integration teams working in Azure.
Logic Apps is best at connecting things and coordinating steps. Keep business calculations inside code or the systems that own them, and use workflows for the choreography around them.
Why it matters to the business
Manual hand-offs between systems are slow, error-prone, and invisible. Someone copies data from an email into a spreadsheet, another person re-types it into a finance system, and nobody can say how long it took or where it stalled. Automated workflows shorten that journey, remove typing mistakes, and leave a complete record of every step. Teams recover hours each week, customers get faster answers, and managers gain a clear view of how work actually flows through the organisation.
2Core Concepts and Vocabulary
A handful of terms appear in every conversation about Logic Apps. Learn them once and the rest of the guide becomes easy to read.
Workflow
The set of steps that runs when a trigger fires. It is the thing you design, test, and deploy.
Logic app
The Azure resource that holds one workflow in the Consumption model, or many workflows in the Standard model.
Trigger
The first step. It starts a run when an event happens, such as an email arriving, a message landing in a queue, or a schedule firing.
Action
Any step after the trigger: calling a service, transforming data, making a decision, or waiting.
Run
One execution of a workflow, with its own recorded inputs, outputs, status, and duration.
Connector
A prebuilt wrapper that gives triggers and actions for a service, handling its interface and sign-in.
Connection
The saved sign-in and settings that a workflow uses to reach a service through a connector.
Control flow
Conditions, switches, loops, scopes, and parallel branches that shape how steps run.
Expression
A small formula used inside a step to compute values, reshape text, or read data from earlier steps.
Consumption
The multitenant, pay-per-execution model with one workflow per logic app.
Standard
The single-tenant model that hosts many workflows on dedicated compute with stronger networking.
Integration account
A container for business-to-business artifacts such as partners, agreements, schemas, and maps.
The anatomy of a run
Each run begins with the trigger’s output, which becomes data that later steps can read. Every action records what it received and what it returned, and these records form the run history. A step can use the output of any earlier step by name, so data flows down the workflow like water down a series of pools. If a step fails, the run records the failure, and the workflow can be designed to catch it, retry, or take another route.
Designer view and code view
Workflows are stored as a definition in a structured text format. The designer shows that definition as boxes and arrows, and a code view shows the text itself. Most people work visually, while advanced users switch to the code view for precise control, bulk edits, or source control. Because the definition is just a file, it can be reviewed, versioned, and deployed like any other artifact, a point that matters greatly for teams.
| Term | Plain meaning | Why it matters |
|---|---|---|
| Polling trigger | Checks a service on a schedule for new items | Delays and cost depend on how often it checks |
| Push or webhook trigger | The service calls the workflow when something happens | Fast and efficient for event-driven designs |
| Run after | A setting that decides when a step runs based on the previous step’s result | The key to error handling |
| Scope | A group of steps treated as one block | Lets you catch failures of a whole group |
| Retry policy | Rules for trying a failed call again | Absorbs short outages without human help |
Naming that helps the next person
Good names are the cheapest documentation. Name workflows after the business outcome, such as process incoming invoices, not after the tool or the author. Rename each step to say what it does, such as get customer record or send approval request, instead of leaving default labels. Names appear in run history, logs, and alerts, so clear names make troubleshooting faster and let support staff understand a failure without opening the designer.
3Architecture: Designer, Runtime, Connectors, and Storage
Under the friendly boxes there is a runtime engine, a connector layer, and a place where state is kept. Knowing these parts explains most behaviour you will see.
Think of a restaurant. The recipe card is the workflow definition. The kitchen is the runtime that follows the recipe. The suppliers who deliver ingredients are the connectors reaching outside systems. The order book that records every dish prepared is the run history. You can change the recipe without rebuilding the kitchen, and the order book lets you answer any question about yesterday’s dinners.
The runtime engine
The runtime reads the workflow definition, waits for the trigger, and executes actions in the order and conditions defined. It manages parallel branches, loops, waits, retries, and timeouts. For long waits, it saves its state, releases resources, and resumes when the time comes or the event arrives. This is why a workflow can wait three days for an approval at almost no cost.
The connector layer
Connectors come in two broad families. Built-in connectors run inside the workflow runtime itself, close to the engine, which makes them fast and, in the Standard model, able to use private networks. Managed connectors run as separate shared services hosted and maintained by Microsoft; the workflow calls them over the network using stored connections. Custom connectors let you wrap your own web interface so that it appears like any other connector. Chapter 6 covers the differences.
State and run history
For stateful workflows, the runtime saves the inputs and outputs of each step in storage. In the multitenant model, Microsoft manages this storage. In the Standard model, it uses an Azure Storage account that you provide, which is why storage choices affect cost and performance there. The saved state enables run history, resubmitting failed runs, long waits, and reliable recovery after failures. Stateless workflows skip this and run in memory for speed, which has trade-offs described in Chapter 7.
flowchart TD
EV[Event or schedule] --> TR[Trigger]
subgraph RT[Workflow runtime]
TR --> A1[Action one]
A1 --> C1{Condition}
C1 -->|Yes| A2[Action two]
C1 -->|No| A3[Action three]
A2 --> SC[Scope with error handling]
A3 --> SC
end
A1 --> BC[Built-in connector in runtime]
A2 --> MC[Managed connector service]
A3 --> HTTP[Web interface or custom connector]
RT --> ST[State and run history storage]
MC --> EXT[External systems]
BC --> EXT
HTTP --> EXT
The management layer
Around the runtime sits the Azure management layer. Through Azure Resource Manager you create logic apps, set access roles, configure diagnostic logs, and deploy templates. The same layer controls identity, networking settings, and policy. The designer in the portal, the extension in Visual Studio Code, and automation pipelines all talk to this layer, which is why a workflow built in one place can be edited in another.
How a request travels
sequenceDiagram
participant C as Caller or event source
participant T as Trigger
participant R as Runtime
participant X as Connector
participant S as Target system
participant H as Run history
C->>T: Event or request arrives
T->>R: Start run with trigger data
R->>X: Execute action with connection
X->>S: Call the target system
S-->>X: Response
X-->>R: Output data
R->>H: Record inputs and outputs
R-->>C: Response, if the design returns one
Run history stores inputs and outputs of steps, including sensitive data, unless you mark them secure. Treat the history like a data store and protect it accordingly.
Scaling out and in
The runtime handles load by running many workflow instances at once. In the multitenant model, the platform adds capacity behind the scenes, within published limits. In Standard, instances of the hosting plan are added or removed according to the plan settings and the number of events waiting. Because runs are independent, most workflows scale well, provided their targets can keep up. The limiting factor is usually the slowest system the workflow calls, not the workflow engine itself.
4Triggers, Actions, and Control Flow in Depth
The building blocks look simple, yet the choices you make about them decide how fast, cheap, and dependable your workflow will be.
Choosing a trigger
Every workflow starts with exactly one trigger. Triggers fall into a few styles. A recurrence trigger starts on a schedule, such as every hour, and suits batch jobs. A request trigger gives the workflow its own web address that callers can send messages to, and suits workflows exposed as small interfaces. A polling trigger checks a service regularly for new items, such as new rows in a table or new messages in a mailbox. A push trigger registers with a service and is called when something happens, so there is no waiting and no wasted checks. Wherever possible, prefer push triggers, because polling creates delay and charges for checks that find nothing.
| Trigger style | How it starts | Strength | Watch out for |
|---|---|---|---|
| Recurrence | On a timetable | Predictable batch work | Overlap if a run lasts longer than the interval |
| Request | A caller sends a message to the workflow | Expose a flow as a small interface | Authentication and timeouts for callers |
| Polling | The service checks for new data | Works with systems that cannot call out | Delay and cost of empty checks |
| Push or webhook | The source calls the workflow | Fast and efficient | Needs source support and secured addresses |
| Message-based | A message arrives in a queue or topic | Reliable decoupling | Duplicate handling and ordering |
Actions and data
Actions fall into groups: calls to connectors, calls to arbitrary web interfaces, data operations such as composing, parsing, selecting, and filtering, variable operations, and calls to other workflows or to code such as functions. Data operations are especially valuable, because they let you reshape arrays and objects between systems without writing code. Parsing a message against a schema gives later steps friendly named fields instead of raw text.
Control flow
Condition and switch
Choose a path by testing values. Use a switch when one value has several possible cases.
For each loop
Repeat steps for every item of a list, optionally in parallel for speed, within documented limits.
Until loop
Repeat until a condition becomes true, with limits on count and time to prevent endless loops.
Scope
Group steps so you can handle success or failure of the whole group in one place.
Parallel branches
Run independent steps at the same time and continue when all have finished.
Delay and wait
Pause for a time or until a moment, releasing resources while waiting.
Expressions
Expressions are short formulas written in a workflow language. They combine functions for text, dates, numbers, collections, logic, and conversion, and they can read the outputs of earlier steps. Most workflows need only a handful: formatting a date, checking whether a field is empty, joining pieces of text, or picking the first item from a list. Keep expressions short and readable. If an expression grows long, split it into several named steps or move the logic into code, since the next person to maintain it will thank you.
Loops need care
Loops are powerful and dangerous. A for-each over a list of ten thousand items, each making a web call, can run for a long time, hit rate limits at the target, and produce huge run histories. Limit the size of lists before looping, use parallelism carefully with the target’s limits in mind, and consider handing batches to a queue instead. Always keep in mind the documented ceilings for items per loop and nested depth, which differ between hosting models.
flowchart TD
T[Trigger: new order message] --> P[Parse message]
P --> C{Order value above limit}
C -->|Yes| AP[Send approval and wait]
C -->|No| OK[Mark as approved]
AP --> D{Approved}
D -->|Yes| OK
D -->|No| REJ[Notify customer and stop]
OK --> LOOP[For each order line]
LOOP --> INV[Reserve stock]
INV --> LOOP
LOOP --> DONE[Send confirmation]
One trigger, short clear steps, meaningful names, and no hidden logic. A workflow should read like a story that a colleague can follow in two minutes.
Trigger conditions and early filtering
Not every event deserves a run. Many triggers accept a condition that is checked before a run starts, so messages that do not match are ignored at no action cost and without cluttering history. For example, start only for invoices above a certain amount or only for messages with a particular label. Filtering at the trigger is the cheapest and clearest way to keep workflows focused, and it keeps run counts, bills, and dashboards honest.
5Choosing Your Home: Consumption, Standard, and Other Hosting Options
The hosting model is the biggest design decision. It shapes cost, networking, tooling, and how many workflows you can run together.
Compare taking a taxi, leasing a car, and owning a delivery van. A taxi charges per ride with no commitment, a lease gives you a dedicated vehicle for a fixed fee, and a van you run yourself gives full control but also all the upkeep. Consumption, Standard, and self-hosted options follow that same spectrum.
Consumption
In the Consumption model, each logic app contains exactly one workflow and runs on shared, multitenant infrastructure managed by Microsoft. You pay for what runs: executions of triggers and actions, with the price depending on the kind of operation. It scales automatically and needs almost no setup, which makes it excellent for small, occasional, or unpredictable workloads and for quick experiments. Its limits are fewer controls over networking, shared outbound addresses, and one-workflow-per-resource packaging.
Standard
The Standard model hosts many workflows inside one logic app resource, which share the same compute, storage, and network settings. It runs on a single-tenant runtime, meaning your own instances rather than a shared pool. You pay for the hosting plan you choose, not per action, and stateful workflows also incur storage transaction costs. Standard offers dedicated outbound addresses, virtual network integration, private endpoints, local development in Visual Studio Code, a broader set of built-in connectors, and both stateful and stateless workflow types. It suits steady, high-volume, or security-sensitive workloads and teams that treat workflows as software projects.
App Service Environment and hybrid
Standard can also run in an App Service Environment version 3, a fully isolated and dedicated environment in your own virtual network, which suits strict isolation and compliance needs. A hybrid option lets Standard workflows run on infrastructure you operate, such as on-premises or in another cloud, with their own pricing, for cases where data or systems cannot leave a location. The older Integration Service Environment, a dedicated option for the previous generation, was retired on 31 August 2024, and Microsoft directed its customers to Standard.
| Feature | Consumption | Standard |
|---|---|---|
| Workflows per resource | One | Many |
| Hosting | Multitenant | Single-tenant, App Service Environment v3, or hybrid |
| Billing | Per execution | Hosting plan, plus storage transactions for stateful workflows |
| Networking | Shared outbound addresses, limited private options | Dedicated addresses, virtual network integration, private endpoints |
| Workflow types | Stateful behaviour | Stateful and stateless |
| Local development | Limited | Full in Visual Studio Code |
| Deployment | Template deploys app and infrastructure together | App and infrastructure deployed separately |
| Data location | Managed by service, paired region replication applies | Stays in the region where you deploy |
flowchart TD
START[New automation need] --> Q1{Private network or fixed addresses needed}
Q1 -->|Yes| STD[Standard]
Q1 -->|No| Q2{Many related workflows or high steady volume}
Q2 -->|Yes| STD
Q2 -->|No| Q3{Small, occasional, unpredictable}
Q3 -->|Yes| CON[Consumption]
Q3 -->|No| Q4{Need local development and CI pipelines}
Q4 -->|Yes| STD
Q4 -->|No| CON
STD --> Q5{Strict isolation or on-premises placement}
Q5 -->|Isolation| ASE[App Service Environment v3]
Q5 -->|On-premises| HYB[Hybrid deployment]
Cost in practice
A rough rule is that Consumption wins at low or spiky volume, because you pay nothing when idle, while Standard wins as volume grows and becomes steady, because fixed hosting cost spreads across many runs. Do the calculation with your real number of actions per month using the official pricing calculator, since prices differ by region and change. Remember to include storage, networking, and monitoring in the Standard comparison.
Moving between models
There is no one-click switch between Consumption and Standard, because the resource models differ. Tools and guidance exist to export workflows and rework connections, but plan the move like a small project and test thoroughly. This is a reason to choose carefully at the start and to keep workflows small and well documented.
Problem
A team builds hundreds of separate Consumption logic apps for a connected business process, each with its own connections and settings, and needs private network access to a database later.
Why It’s Harmful
Management grows painful, connection settings are duplicated, cost grows with every action, and the missing private networking forces a rebuild under pressure.
Correct Approach
Group related workflows in a Standard logic app from the start when volume, networking, or team practices call for it, and keep Consumption for small, independent automations.
6Connectors and Connections
Connectors are the reason Logic Apps is quick to use. Knowing the kinds, and how each signs in, saves hours of confusion.
Think of travel plug adapters. Each country uses a different socket, and the adapter lets your device work anywhere without rewiring it. A connector is an adapter between your workflow and a service’s own interface, and a connection is the adapter already plugged in and powered.
Built-in connectors
Built-in connectors run in the same process as the workflow engine. They are fast, can be more efficient to run, and in the Standard model can reach private resources through the app’s network. Standard offers a rich built-in set, including connectors for blob storage, queues and topics, event streaming, databases, file transfer, and message queuing products, in addition to core operations such as requests, schedules, data operations, and variables. You can even write custom built-in connectors for the Standard runtime when you need more control.
Managed connectors
Managed connectors are hosted by Microsoft as separate shared services. They cover a very wide range of services, from Microsoft 365 and databases to enterprise applications and social tools. Workflows call them over the network using a stored connection that holds the sign-in. Because they run outside your app, they have their own throttling limits, and they may be reached through public paths, which matters for strict networks. Some are labelled standard and some premium, which affects pricing.
Custom connectors
If a service you need has no connector, you can create a custom connector by describing its web interface. Once defined, it appears in the designer like any other, with named operations and parameters. Custom connectors are useful for internal services, because they hide technical details from workflow authors and give them clean, tested building blocks.
Built-in
Runs inside the runtime. Fast, can use private networks in Standard, and often cheaper to operate.
Managed
Hosted and maintained by Microsoft. Huge catalogue, separate limits, connection-based sign-in.
Custom
Wraps your own web interface so authors get clear, reusable operations.
HTTP action
A general way to call any web interface directly when no connector fits or when you need full control.
How connections authenticate
Each connection stores how the workflow signs in to the service. Options include a user account signing in interactively, a service principal, a managed identity, a shared key or connection string, or an API key. Interactive user sign-in is convenient but ties the workflow to a person, which breaks when that person leaves or their password changes. For production, prefer a managed identity or a service account designed for automation, with the narrowest permissions the workflow needs.
| Sign-in method | Strength | Weakness | Use when |
|---|---|---|---|
| Managed identity | No stored secret, platform-rotated | Target must support Entra authentication | Azure services and many modern interfaces |
| Service principal | Dedicated identity for automation | Secret or certificate must be rotated | Targets that need app registration |
| User account | Easy for prototypes | Tied to a person, fragile | Quick tests only |
| Connection string or key | Simple | Long-lived secret, wide power | Legacy targets, stored in Key Vault |
Reusing connections
In the Standard model, connections are shared across the workflows in a logic app, which reduces duplication. Name connections after their purpose and target, and avoid personal accounts. When a connection breaks, every workflow that uses it fails together, so monitor connection health and set alerts on repeated authentication failures.
Managed connectors apply their own throttling per connection. A fast loop calling one connector may be slowed or rejected, even when the Logic Apps platform itself has room. Check the connector’s reference page for its limits.
Choosing connectors wisely
Before using a connector, read its reference page: the operations it offers, the sign-in methods, the throttling limits, the pricing class, and any known issues. Prefer connectors maintained by the service owner, and be careful with preview connectors in production. When a connector lacks a feature you need, a direct call to the service’s web interface using the HTTP action, authenticated with a managed identity, is often a clean alternative.
7Reliability: Stateful and Stateless Runs, Retries, and Error Handling
Systems fail in small ways all the time. A reliable workflow expects failure and has a plan for it.
Think of a courier who finds the recipient absent. A poor courier gives up and loses the parcel. A good courier tries again later, leaves a card, and reports back to the sender. Retries, fallbacks, and reports are the courier’s habits, and they are what you build into a workflow.
Stateful and stateless workflows
In the Standard model you choose, when creating a workflow, whether it is stateful or stateless, and you cannot safely change it afterwards. A stateful workflow saves the inputs, outputs, and progress of each step to storage. This gives full run history, the ability to resume after a restart, resubmission of failed runs, long waits, and processing of large messages. A stateless workflow keeps everything in memory, runs faster and cheaper, and does not store history, which makes it best for short, quick, request-and-response flows. Stateless workflows allow only push-style triggers, are best kept under about five minutes and small payloads, and have lower limits for some loops and variables.
| Aspect | Stateful | Stateless |
|---|---|---|
| State saved | Yes, after each step | No, in memory only |
| Run history | Full, with inputs and outputs | Limited, unless debugging is enabled |
| Long waits and approvals | Supported | Not suited |
| Speed and latency | Slower, storage involved | Faster |
| Typical use | Business processes, integrations, retries | Quick transforms and request-response APIs |
Retry policies
Most actions that call other services have a retry policy. The default usually tries a few times with pauses between, so a brief outage of the target passes unnoticed. You can change the policy to none, a fixed interval, or an exponential back-off, with limits on counts and total time. Retry only things that are safe to repeat, and set sensible limits: ten retries with long pauses may keep a failing call alive for hours and hide a real problem.
Idempotency: safe to repeat
Because retries, duplicate triggers, and resubmissions can repeat a step, steps that change data should be idempotent, meaning that doing them twice has the same result as doing them once. Use unique identifiers from the source message, check whether the work was already done, and prefer operations such as upsert over blind insert. This one habit prevents double charges, duplicate emails, and double bookings.
Catching failures: run after and scopes
Each action has a run-after setting that says which results of the previous step trigger it: succeeded, failed, skipped, or timed out. By grouping steps into a scope and adding a following step that runs only when the scope failed, you create the equivalent of a try-and-catch block. In the catch branch you can log the error, send a notification, put the message on a dead-letter queue, or call a compensation workflow. A final step that runs regardless can act as a finally block.
flowchart TD
T[Trigger] --> TRY[Scope: main work]
TRY -->|Succeeded| OK[Confirm and finish]
TRY -->|Failed or timed out| CATCH[Scope: handle error]
CATCH --> LOG[Log error details]
LOG --> DLQ[Send message to a holding queue]
DLQ --> ALERT[Alert the owner]
OK --> FIN[Final cleanup step]
ALERT --> FIN
Timeouts and long operations
Web calls have time limits, which differ by hosting model, and a caller waiting for a response will give up after its own timeout. For operations that take longer, use an asynchronous pattern: the first call returns quickly with a status address, and the workflow either polls it or receives a callback when the work is done. Workflows themselves can run for many days in stateful mode, but history retention should be kept at least as long as the longest run, or history may vanish before a run ends.
Dead letters and manual repair
Not every failure can be fixed by a machine. Plan a place where failed messages wait for a person: a queue, a table, or a ticket. Give operators a simple way to resubmit a failed run after the cause is fixed. Resubmission from run history is built in for stateful workflows, which is one reason they are the default for important flows.
For each important step ask three questions: what if the target is down, what if it answers twice, and what if the data is wrong? If you have an answer for each, the workflow is ready.
Problem
A workflow has no error branch, uses default settings everywhere, and relies on someone noticing failed runs in the portal.
Why It’s Harmful
Failures pass silently, messages are lost, and customers discover problems before the team does. Duplicate runs cause repeated side effects.
Correct Approach
Wrap main work in a scope, add a failure branch that logs, alerts, and parks the message, and make state-changing steps idempotent.
Concurrency and ordering
When several messages arrive together, the runtime may process them in parallel, so results can finish out of order. If order matters, such as updates to the same customer, limit concurrency to one for that stream or group related messages by key using sessions. If order does not matter, allow parallel runs for speed. Decide this early and document it, because changing concurrency later can change behaviour in ways that surprise downstream systems.
8Integration Patterns That Work
Most workflows are variations of a few well-known shapes. Recognising the shape tells you the right design immediately.
Pattern 1: Request and response
A caller sends a request, the workflow does a few quick steps, and returns a response. It is best for small interfaces that combine several calls into one. Keep it fast, because callers wait, and use stateless Standard workflows when response time matters most. If the work can take long, switch to the asynchronous pattern.
Pattern 2: Asynchronous request with callback
The caller receives an immediate acknowledgement with a tracking address. The workflow does the work in the background and either lets the caller poll the status or calls a callback address when finished. This avoids timeouts and suits long jobs such as report generation or document processing.
sequenceDiagram
participant C as Caller
participant W as Workflow
participant J as Long job
C->>W: Submit request
W-->>C: Accepted with status address
W->>J: Start background work
C->>W: Check status
W-->>C: Still running
J-->>W: Finished with result
W->>C: Callback with result or status becomes complete
Pattern 3: Queue-based load levelling
Messages arrive in a queue and the workflow processes them at its own pace. The queue absorbs bursts, protects slow targets, and lets failed messages return for another try. This is the most dependable pattern for integration, and Logic Apps has strong connectors for queues and topics. Use sessions or ordering features if order matters, and design for duplicates since most queues deliver at least once.
Pattern 4: Fan-out and fan-in
One message triggers several parallel tasks, such as sending an order to billing, shipping, and analytics, and then a later step collects results. Parallel branches or separate child workflows do the work. Be careful with partial failure: decide what happens if two of three succeed.
Pattern 5: Approval and human in the loop
The workflow sends a request for approval, then waits, possibly for days, until someone responds or a timeout passes. Include a reminder, an escalation, and a default action on timeout. Because stateful workflows release resources while waiting, this costs almost nothing.
Pattern 6: Saga and compensation
When a business process spans several systems that cannot share one database transaction, you cannot simply roll everything back. Instead, each step has a compensating step that undoes its effect, such as cancelling a booking. If a later step fails, the workflow runs the compensations for the earlier ones. This is a saga. It needs careful design, but it is the honest answer to distributed processes.
Pattern 7: Scheduled batch with checkpoint
A recurrence trigger starts a job that processes new records since the last run. A saved checkpoint, such as the time or identifier of the last processed record, ensures nothing is skipped or repeated, even if a run fails and the next one catches up.
| Pattern | Best when | Key risk | Key safeguard |
|---|---|---|---|
| Request and response | Short calls with an immediate answer | Timeouts | Keep steps few and fast |
| Asynchronous callback | Long jobs | Lost callbacks | Offer a status address as well |
| Queue-based | Bursts and slow targets | Duplicates and poison messages | Idempotency and dead-letter queue |
| Fan-out and fan-in | Independent parallel tasks | Partial failure | Define combined outcome rules |
| Approval | Human decisions | Forgotten requests | Reminders and timeouts |
| Saga | Multi-system business processes | Inconsistent state | Compensating steps |
| Batch with checkpoint | Regular bulk processing | Overlap or gaps | Saved checkpoint and run locks |
Break large processes into smaller child workflows with clear inputs and outputs. They are easier to test, reuse, and monitor, and they keep each workflow within the limit on the number of actions.
Keeping contracts stable
Workflows that call each other, or that expose request interfaces, form contracts with their callers. Define the shape of requests and responses with schemas, version them, and change them in compatible ways: add optional fields, avoid renaming or removing existing ones, and keep old versions alive until callers have moved. A small effort on contracts prevents the chain reactions that happen when one team changes a message and ten other workflows begin to fail.
9Enterprise Integration: B2B, Transformations, and On-Premises Systems
Logic Apps grew up in enterprise integration. It can exchange formal business documents with partners and bridge old systems with new ones.
International trade relies on standard forms: shipping notes, invoices, and customs declarations that every party recognises. A translator at the border converts between the forms of different countries. B2B integration is that standard-forms system for electronic documents, and maps are the translators.
Integration accounts and B2B
For business-to-business exchange, Logic Apps uses an integration account, a container for partners, agreements, schemas, certificates, and maps. With it, workflows can receive and send documents in standard formats widely used in trade, such as EDI formats like X12 and EDIFACT, and protocols like AS2. Operations include decoding and encoding messages, validating them against schemas, generating acknowledgements, and tracking message status. The Standard model reduces the need for an integration account for some operations, such as simple XML and Liquid transforms, where artifacts are uploaded directly to the logic app, but a full B2B setup still uses partners and agreements.
Transformations
Systems rarely agree on field names or structure. A map converts a message from one shape to another. XML-based maps use a transformation language, Liquid templates transform JSON and text, and data operations inside the workflow handle simpler reshaping. Keep maps in source control, test them with sample messages, and version them with the workflows that use them, so a change to a map is reviewed like code.
Reaching on-premises systems
Many companies still keep databases and applications in their own data centres. There are several ways in. The on-premises data gateway is an agent installed inside the network that lets managed connectors reach local systems through an outbound secure channel. In the Standard model, virtual network integration with a private route, such as a VPN or dedicated circuit, lets built-in connectors reach local servers directly. Hybrid deployment can run the workflow runtime itself near the systems. Choose by latency, security rules, and operations effort.
flowchart LR
P1[Partner one via AS2] --> LA[Logic Apps Standard]
P2[Partner two via file transfer] --> LA
LA --> DEC[Decode and validate documents]
DEC --> MAP[Transform with maps]
MAP --> ERP[On-premises ERP through private network or gateway]
MAP --> BUS[Message queue for internal systems]
LA --> ACK[Acknowledgement back to partners]
ACK --> P1
ACK --> P2
Working with files and large messages
Messages and files have size limits per action, though chunking can raise the practical limit for some connectors. For large files, avoid passing the content through the workflow at all: store the file in blob storage and pass only its address between steps, letting each system fetch it directly. This pattern, sometimes called the claim check, keeps workflows light and avoids memory and limit problems.
Working with other Azure services
With Functions
Use a function when logic is too complex for expressions: heavy calculation, custom parsing, or special libraries. The workflow calls the function and continues with the result.
With Service Bus and Event Grid
Use queues for reliable work distribution and events for reacting to changes in Azure resources. Workflows consume both through triggers.
With API Management
Put a gateway in front of request-triggered workflows to add authentication, throttling, caching, and a stable public address.
With Data Factory
Use Data Factory for heavy data movement and large analytical pipelines, and Logic Apps for event-driven orchestration and application integration. They complement each other.
Designing for partner change
Partners change their formats, add fields, and switch versions, often with little warning. Protect yourself with strict validation at the border, clear error reports back to the partner, and versioned schemas and maps. Keep a library of real sample documents from each partner, including awkward ones, and run them through your maps whenever anything changes. A short onboarding checklist for new partners, covering identifiers, certificates, formats, and test exchanges, saves weeks of back and forth.
10AI and Agent Workflows
Logic Apps now includes ways to let AI models decide what to do next, using the same connectors and safeguards that ordinary workflows use.
A normal workflow is a recipe followed exactly. An agent workflow is a capable assistant given a goal and a toolbox. You say “sort this complaint and fix what you can”, and the assistant chooses which tools to use, in what order, and when to ask a person. The toolbox is made from connectors and workflows you have already built and secured.
What an agent workflow is
In Logic Apps Standard, an agent workflow contains an agent action, often described as an agent loop. The loop connects a language model to a set of tools, which are actions the agent may call. The model reads the goal and the context, chooses a tool, receives its result, and repeats until it decides the goal is met or it needs help. Microsoft announced general availability of Agent Loop in Logic Apps Standard in November 2025, along with further AI features that were in public preview at that time. Features in preview can change, so confirm their status before relying on them.
Autonomous and conversational agents
Autonomous agents start from a trigger, such as a new support ticket or an incoming document, work on their own, and finish with an outcome. Conversational agents interact with a person in a chat, answering questions and carrying out requests using tools. Both can include a human approval step before sensitive actions.
Tools, knowledge, and models
Tools are the actions the agent is allowed to use: look up a customer, create a ticket, send an email, call an internal interface. Each tool is limited by the connection’s permissions, so an agent cannot do more than its tools allow. Models are provided through Azure’s AI services, and your instructions to the agent, called a system prompt, define its role, rules, and tone. Knowledge can be supplied by searching your documents so that answers are grounded in your content instead of guessed.
flowchart TD
TRG[Trigger: new support ticket] --> AG[Agent loop with goal and instructions]
AG --> M[Language model decides next step]
M --> T1[Tool: look up customer]
M --> T2[Tool: search knowledge base]
M --> T3[Tool: draft reply]
T1 --> M
T2 --> M
T3 --> M
M --> H{Sensitive action}
H -->|Yes| APR[Human approval]
H -->|No| ACT[Take action]
APR --> ACT
ACT --> LOG[Record steps in run history]
Safe use of agents
Least-privilege tools
Give each tool a connection that can do only what the agent needs, never broad administrator rights.
Human approval
Require a person to confirm actions that spend money, delete data, or contact customers.
Limits on loops
Cap the number of iterations and the total time so an agent cannot wander or run up cost.
Input caution
Treat text from outside as untrusted, since it may try to trick the model into unwanted actions. This is known as prompt injection.
Record and review
Use run history and logs to review what the agent did and why, and test with real examples before launch.
When not to use an agent
If the steps are known and fixed, a plain workflow is cheaper, faster, and more predictable. Use agents where the path varies with the content, such as reading free-form text and deciding the next step. Mix the two: a plain workflow for the reliable skeleton and an agent step where judgement is needed. Also remember that models can make mistakes and that costs depend on usage, so measure quality and cost during a pilot.
Model processing may not stay in the same region as the workflow in every case. If data residency matters, check where the model runs before sending personal or regulated data to it.
Measuring agent quality
An agent is only as good as the evidence that it works. Before launch, build a set of real examples with known good outcomes and run the agent against them, scoring accuracy, tool choices, and tone. After launch, sample live runs for review every week, track how often humans override the agent, and watch cost per case. When quality drifts, adjust instructions, tools, or knowledge sources, and rerun the examples. Treat the agent like a new employee on probation, with supervision that gradually relaxes as trust is earned.
11Security: Identity, Access, and Protecting Data in Runs
Workflows hold the keys to many systems and handle sensitive data. They deserve the same security care as any production application.
A workflow is like a trusted courier with access to many buildings. You check who may hire the courier, which doors the courier’s pass opens, whether the courier’s notebook records secrets, and who may read that notebook. Each question matches one layer of security.
Who can call the workflow
Request-triggered workflows have a web address that includes a signature, a long secret token in the address. Anyone holding the full address can call the workflow, so treat it like a password: do not paste it into chat or code, and rotate it if exposed. For stronger control, restrict allowed caller addresses, require Microsoft Entra authorisation where supported, and place a gateway such as API Management in front to add checks. In the Standard model, some authentication options for request triggers differ from those in the Consumption model, so check the current feature notes.
Who can change the workflow
Azure role-based access control governs who can create, edit, run, and view logic apps. Roles such as Logic App Contributor and Logic App Operator separate people who build from people who only monitor or rerun. Give developers rights in development, but in production allow changes only through pipelines. Restrict who can read run history, since it may expose data.
What the workflow can reach
Managed identities let a workflow authenticate to Azure services and to any interface that accepts Entra tokens, with no stored secret. A system-assigned identity belongs to one logic app, while a user-assigned identity can be shared. Grant the identity only the roles it needs on specific resources. Where a secret is unavoidable, such as a vendor key, keep it in Key Vault and reference it, never typing it into a step. In Standard, app settings that point to Key Vault references keep secrets out of workflow definitions.
| Risk | Control |
|---|---|
| Anyone with the trigger address can call the workflow | IP restrictions, Entra authorisation, gateway, rotate the signature if leaked |
| Stored passwords in connections | Managed identity, or Key Vault references |
| Sensitive data visible in run history | Secure inputs and outputs on the relevant steps, restrict history access |
| Over-powerful connection | Least-privilege service identities, one per purpose |
| Unreviewed changes in production | Deploy through pipelines, restrict portal edit rights |
| Data sent to unexpected places | Policy on allowed connectors, outbound network controls |
Securing inputs and outputs
Each step can be marked to hide its inputs, its outputs, or both from the run history. Use this for steps that handle passwords, tokens, personal data, or payment details. Parameters of type secure string are also hidden. Remember that data passed to later steps can still appear there, so mark each step that touches sensitive values. Also think about logs sent to monitoring: the content that is visible in history may be copied to other stores depending on your diagnostic settings.
Connector governance
Organisations can use Azure Policy to control which connectors are allowed or blocked, so that, for instance, a workflow cannot send data to a social media connector. Combine this with network controls on outbound traffic and with reviews of new custom connectors. Governance is the difference between a platform that empowers people and one that quietly leaks data.
flowchart TD
CALLER[Caller] --> GW[API gateway with authentication]
GW --> WF[Workflow]
WF -->|Managed identity| AZ[Azure services]
WF -->|Secret from Key Vault| EXT[External service]
WF --> HIST[Run history with secured inputs and outputs]
ADM[Administrator through pipeline] --> WF
POL[Policy] -->|Allowed connectors and settings| WF
HIST --> LOGS[Logs with restricted access]
For every workflow ask: who can start it, what identity does it use, which secrets does it hold, what data does the history keep, and who can change it? Five answers make a security review.
12Networking and Hybrid Connectivity
Many integrations must stay off the public internet. The hosting model you chose decides what network controls you have.
Multitenant: shared addresses
In the Consumption model, outbound calls come from a published range of shared addresses used by many customers. Target systems that want to allow only your traffic must allow that whole range, which is wide. Inbound calls reach a public address. Options for private access are limited, so for strict network needs, Standard is usually the better home.
Standard: dedicated and private
Standard offers virtual network integration for outbound traffic, so workflows can reach resources inside your network and through it to on-premises systems. Private endpoints for inbound traffic let callers inside your network reach the workflow on a private address, with public access disabled. A network address translation gateway can give outbound traffic a fixed public address that targets can allow. Built-in connectors respect these settings, while managed connectors run outside the app and follow their own paths.
flowchart LR
subgraph VN[Your virtual network]
CL[Internal caller] --> PE[Private endpoint]
PE --> LA[Logic Apps Standard]
LA --> SUB[Integration subnet]
SUB --> DB[Database with private endpoint]
SUB --> ST[Storage with private endpoint]
end
LA -->|Fixed outbound address| EXT[Partner service allowing that address]
ONP[On-premises systems] -->|VPN or private circuit| SUB
NET[Public internet] -.->|Blocked| LA
Storage and dependencies
Standard needs an Azure Storage account for workflow state. If you lock down that account with a firewall or private endpoints, the logic app must be able to reach it through its network integration. Many first-time deployment failures come from forgetting this, or from private DNS zones that do not resolve storage names properly. Plan the storage account, its endpoints, and its DNS together with the logic app.
Reaching on-premises
On-premises data gateway
An agent inside your network that lets managed connectors reach local systems over an outbound channel. Simple, but a component you must operate and keep highly available.
Private route with integration
Virtual network integration plus a VPN or dedicated circuit, so built-in connectors connect straight to local servers.
Hybrid deployment
Run the Standard runtime on infrastructure you operate near the systems, for data that must not leave a location.
Message-based bridge
Local systems write to and read from a cloud queue, so no inbound path is needed at all.
Name resolution and testing
Private connectivity depends on correct name resolution. If the name of a service resolves to its public address from inside the network, traffic may be blocked or leave the network. Test from within the same network and integration subnet, and record the expected address for each dependency. Document the path of each dependency end to end, so the next person can debug it.
Disabling public access before the private path works can lock out the designer, deployment pipelines, and monitoring. Test the private path first, and plan how deployments and the portal will reach a locked-down app.
Documenting the network path
For every dependency of a logic app, write down the name, the expected private address, the route, the firewall rules, and the DNS zone involved. Keep this beside the infrastructure code. When a connection fails at night, the on-call engineer can follow the document from the workflow to the target and find the break quickly. The same document helps security reviewers confirm that no hidden public path exists and helps new team members understand how the pieces connect.
13Development, Deployment, and DevOps
Workflows are software. Treat them with source control, review, testing, and automated release, and they become much safer to change.
A factory does not let workers adjust machines at random during production. Changes are drawn up, tested on a trial line, approved, and then installed in a planned way. A deployment pipeline is the factory’s change process for your workflows.
Where you build
The portal designer is great for learning and quick edits. For serious work, teams use Visual Studio Code with the Azure Logic Apps extension for the Standard model. It allows local building, running, and debugging on a developer’s machine, with breakpoints on actions, and keeps all files in a normal project folder suitable for source control. Consumption workflows can also be built in Visual Studio Code or exported as templates for source control.
Parameters and environments
The same workflow must run in development, test, and production with different addresses, names, and secrets. Use parameters and app settings for such values and keep environment-specific values outside the workflow definition. In Standard, connection details and settings can be defined per environment and supplied by the pipeline. Avoid hard-coding addresses inside steps, because a copy to production then silently calls the test system.
Infrastructure as code and release pipelines
In Standard, infrastructure and application are deployed separately. Templates in languages such as Bicep or ARM, or tools such as Terraform, create the logic app, storage, networking, identity, and monitoring. The workflow files are then packaged and deployed to the app through a pipeline. In Consumption, a single template deploys the logic app and its definition together. In both cases, store everything in version control, review changes by pull request, and promote through environments using the same artifact.
Develop
Build and run workflows locally or in a development app, with sample data and test connections.
Commit and review
Store workflow files and infrastructure templates in source control and review changes with peers.
Build and validate
The pipeline packages the artifact, checks for secrets, and runs automated tests against test targets.
Deploy to test
Deploy infrastructure and workflows, apply settings, and run end-to-end checks.
Promote to production
Deploy the same artifact with production settings, use approvals, and verify with monitoring.
Testing workflows
Test at several levels. Unit-style tests run single workflows with mocked responses from connectors, which is possible with testing features for Standard. Integration tests call real test systems. Load tests check behaviour under volume. Contract tests ensure that changes in maps and schemas do not break partners. Keep sample messages in the repository, including malformed ones, because real traffic eventually sends them.
Safe release techniques
Because a trigger starts runs automatically, deploying a new version while runs are in flight needs thought. Stateful runs in progress continue with the definition they began with in many cases, but changes that affect shapes of stored data can break them. Disable the trigger briefly, let inflight runs finish, deploy, and then enable. For critical flows, run old and new side by side with a queue split, or use deployment slots in the Standard model where supported, and keep a rollback plan.
Keep workflows, maps, schemas, templates, and settings definitions under version control together, and tag releases. Rolling back is easy only when you know exactly what was deployed.
Managing connections in pipelines
Connections are a frequent source of release problems, because they hold sign-in details that differ per environment. Define connections as code, use managed identities so that no secret needs to move, and have the pipeline create or update them in each environment before workflows are deployed. After deployment, run a smoke test that calls each connection once. Catching an unauthorised connection during release is far better than discovering it when the first real message arrives.
14Monitoring, Logging, and Troubleshooting
A workflow that fails quietly is worse than one that fails loudly. Build visibility in from the first day.
Run history
The first place to look is the run history, which lists runs with status, start time, and duration. Opening a run shows each step with its inputs and outputs, in green for success and red for failure, so you can see where data went wrong. For stateful workflows you can resubmit a failed run from the history once the cause is fixed. History is kept for a limited time, commonly ninety days by default, and the retention can be adjusted within limits, so export what you need for longer.
Diagnostic logs and metrics
Diagnostic settings send detailed workflow logs and metrics to Log Analytics, storage, or an event hub. Records show runs, triggers, and actions with their status and timing, and can carry tracked properties that you define, such as an order number, so you can search for all activity related to one business item. Metrics show counts of runs, failures, latency, and throttled calls, which feed charts and alerts.
Application Insights for Standard
Standard integrates with Application Insights, which collects telemetry from the runtime, including requests, dependencies, exceptions, and performance counters. It helps find slow connectors, retries, and memory pressure, and it can follow a request through several workflows and functions using correlation. Enable it at creation, and watch the volume, since detailed telemetry costs money.
flowchart LR
WF[Logic app workflows] --> RH[Run history]
WF --> DS[Diagnostic settings]
WF --> AI[Application Insights]
DS --> LA[Log Analytics workspace]
AI --> LA
LA --> AL[Alert rules]
LA --> WB[Workbooks and dashboards]
AL --> AG[Action groups to teams and tickets]
RH --> RES[Resubmit failed runs]
Alerts worth having
Failed runs
Alert when failures exceed a threshold in a time window, or when a specific critical workflow fails at all.
Missing runs
Alert when a workflow that should run regularly has not run, since silence often means a broken trigger or connection.
Latency and throttling
Alert when durations rise sharply or connectors return too many throttling responses.
Authentication failures
Alert on repeated sign-in errors in connections, which often precede many failures.
Backlog
Alert when queue depth feeding a workflow keeps rising, showing the workflow cannot keep up.
Troubleshooting checklist
| Symptom | Likely causes | First checks |
|---|---|---|
| Trigger never fires | Workflow disabled, polling source empty, broken connection, network block | Check enabled state, connection status, and trigger history |
| Step fails with unauthorised | Expired credentials, missing role, changed password | Re-authorise the connection or fix the role |
| Step fails with too many requests | Throttling at the target or connector | Reduce concurrency, add delays, check limits |
| Timeouts on web calls | Long operation, slow target | Switch to asynchronous pattern or raise target performance |
| Runs pile up | Concurrency too low or target slow | Review concurrency settings and queue depth |
| Works locally, fails in Azure | Missing app settings, network path, identity roles | Compare settings, test network from the app, check roles |
| Unexpected cost | Frequent polling, large loops, verbose telemetry | Review trigger frequency and action counts |
Tracked properties and business visibility
Technical logs tell engineers what happened, but business teams ask different questions: where is order 4512? Add tracked properties such as customer or order numbers to key steps and build a workbook that lets support staff search by those numbers. This turns the run history from an engineer’s tool into a shared view of the process and reduces interruptions.
Building a runbook
Write a short runbook for each important workflow. It should name the owner, say what the workflow does, list its triggers and targets, show where to find its run history and logs, explain the top three failure causes and their fixes, describe how to resubmit failed runs safely, and say whom to call when the fix is not obvious. Review the runbook after every incident. A good runbook turns a stressful guess at two in the morning into a calm checklist.
15Performance, Scale, and Service Limits
Logic Apps scales well, but every part of the chain has limits. Knowing them early prevents painful surprises.
A motorway can carry many cars, but if the exit ramp is narrow the whole road backs up. A fast workflow calling a slow target is a wide road with a narrow ramp. Speed up the ramp, or meter the cars, and the traffic flows.
Where limits come from
Limits arise at four levels: the workflow itself, the hosting platform, each connector, and the target systems. The documentation lists values for each hosting model. Examples at the time of writing include a default of ninety days for run duration and history retention in stateful workflows, a cap of five hundred actions per workflow, a nesting depth of eight, a limit of one trigger per workflow in the designer, and a cap of one hundred thousand items for a for-each loop in stateful and multitenant workflows, with a much lower cap for stateless ones. Message sizes are capped at about one hundred megabytes for ordinary content, with chunking available for some operations. Web call timeouts are around two minutes for multitenant and a little under four minutes by default for single-tenant. Always check the current limits page before designing for large scale.
Concurrency control
Triggers can start many runs at once, and loops can process items in parallel. By default, concurrency settings are conservative or off. You can raise the number of parallel runs or iterations, within limits, to increase throughput, but you must make sure the targets can cope. Turning on trigger concurrency is a one-way change for that trigger, and it cannot simply be turned back off, so test first. For ordered processing, keep concurrency at one and use message sessions.
Throughput in the multitenant model
Consumption has platform-wide throughput limits per workflow, counted in action executions and content volume per five-minute window, with a high-throughput mode available as a preview option for workloads that need more. Calls to the same connector connection are throttled separately. If you approach these limits, split the workload across several logic apps, use queues to smooth bursts, or move to Standard.
Scaling in Standard
Standard scales by adding instances of the hosting plan. Depending on the plan type, scale can be automatic, driven by the number of events waiting, or manual. Stateful workflows depend on the storage account for throughput, so a busy app may need a premium or well-provisioned storage account and separate storage for heavy workloads. Monitor instance counts, processor use, memory, and storage latency. Workflows in the same app share resources, so one very busy workflow can slow its neighbours. Put critical or noisy workflows in separate apps.
flowchart TD
SLOW[Throughput too low] --> A{Where is the bottleneck}
A -->|Target system slow| T1[Add caching, queues, or limit concurrency]
A -->|Connector throttled| T2[Spread across connections or reduce call rate]
A -->|Workflow serial| T3[Enable parallelism or split into child workflows]
A -->|Platform limits| T4[Split workflows across apps or move to Standard]
A -->|Storage latency in Standard| T5[Use faster storage or separate storage accounts]
Performance habits
Use push over polling
Event-driven triggers cut delay and wasted checks.
Filter early
Drop unneeded items at the start, using trigger conditions or filter steps, so later steps handle less.
Pass references, not blobs
Store big content in storage and pass an address, keeping messages small.
Batch where possible
Send items in groups when the target supports it, rather than one call per item.
Prefer built-in actions
Built-in connectors avoid extra network hops and shared limits.
Use stateless for quick calls
Where history is not needed, stateless flows are faster and cheaper.
16Cost, Governance, and Managing Change
At scale, Logic Apps needs budgets, naming, ownership, and a plan for change. This chapter ties those together.
How the bill is made
In Consumption, you pay per execution: each trigger check and each action has a small price, with different rates for built-in, standard connector, and enterprise connector operations, and extra charges for storage of run data and retention beyond the included period. Polling triggers cost money even when they find nothing, so frequent polling of busy systems adds up. In Standard, you pay for the hosting plan, billed by compute resources over time, plus storage transactions for stateful workflows, plus networking and monitoring. Hybrid deployments have their own pricing. Agent workflows add model usage costs. Prices differ by region and change over time, so use the official pricing page and calculator.
| Cost driver | Applies to | How to reduce |
|---|---|---|
| Action and trigger executions | Consumption | Fewer polls, filter early, combine steps, prefer built-in actions |
| Hosting plan size | Standard | Right-size, share across related workflows, scale in off hours |
| Storage transactions | Standard stateful | Use stateless where possible, avoid chatty loops |
| Premium or enterprise connectors | Both | Use built-in or standard alternatives where they fit |
| Monitoring data | Both | Choose log categories and telemetry levels wisely |
| Model usage | Agent workflows | Limit iterations, shorten context, use smaller models where good enough |
Governance basics
Name logic apps, workflows, and connections consistently, including purpose, environment, and owner. Tag resources with owner, cost centre, and criticality. Use Azure Policy to require diagnostic settings, restrict locations, enforce managed identities, limit allowed connectors, and require private networking for production. Keep an inventory of workflows, their triggers, their targets, and who is on call for each. Disable or delete workflows that are no longer used, because forgotten polling workflows keep costing money and keep holding credentials.
Managing change and retirements
The platform evolves. The Integration Service Environment, the dedicated option for the earlier generation, was retired on 31 August 2024 and customers were directed to Standard. Connectors are added, updated, and sometimes deprecated. Features such as high-throughput mode and many AI capabilities start in preview, and preview features can change or lack support guarantees. Assign someone to follow announcements, review connector deprecation notices, test against new runtime versions in non-production, and plan upgrades. Treat dates in any guide, including this one, as pointers and confirm them on official pages.
Inventory
List all logic apps, models, workflows, connections, owners, and criticality.
Set standards
Define naming, tagging, identity, networking, logging, and error-handling standards.
Enforce by policy
Audit first, then deny non-compliant settings, and automate fixes where safe.
Measure
Report on failures, cost by owner, unused workflows, and expiring credentials.
Review quarterly
Reassess hosting choices, limits, announcements, and technical debt.
Retirement dates, preview states, and limits are updated by Microsoft. Confirm them on the official pages before planning.
Showing teams their own spend
Cost falls when owners can see it. Use tags and cost reports to show each team what its workflows cost each month, broken down by logic app and by environment. Highlight the top ten spenders and ask their owners whether the spend is justified. Often a forgotten test workflow, a polling trigger set too fast, or a verbose telemetry setting accounts for most of the surprise. A short monthly review prevents small leaks from becoming large bills.
17Design Patterns, Anti-Patterns, and Best Practices
Patterns are proven answers to repeated problems. This chapter gathers the ones seen in almost every well-run estate, with traps to avoid and a checklist for reviews.
Helpful patterns
Queue in front of the workflow
A queue absorbs bursts, enables retries, and protects slow targets.
Try, catch, and park
Main work in a scope, a failure scope that logs, alerts, and parks the message for repair.
Small child workflows
Reusable pieces with clear inputs and outputs, easier to test and monitor.
Managed identity everywhere
No stored passwords, narrow roles, and secrets from Key Vault only when unavoidable.
Claim check
Keep large content in storage and pass references between steps.
Idempotent steps
Unique keys and upserts so retries and duplicates cause no harm.
Workflows as code
Version control, pull requests, pipelines, and the same artifact promoted across environments.
Observable by design
Tracked properties, alerts for failure and silence, and dashboards owners actually read.
flowchart LR
SRC[Source system] --> Q[Queue]
Q --> WF[Workflow with scope and retries]
WF -->|Success| TGT[Target system]
WF -->|Failure after retries| DLQ[Dead-letter queue]
DLQ --> OPS[Operator review and resubmit]
WF --> LOG[Logs with tracked properties]
LOG --> ALR[Alerts]
More anti-patterns
Problem
Connections use the personal account of the developer who built the workflow.
Why It’s Harmful
When the person leaves, changes their password, or loses a licence, production flows fail. Actions appear in audit logs as that person, and permissions are usually far broader than needed.
Correct Approach
Use managed identities or dedicated service accounts with narrow rights, owned by a team.
Problem
One giant workflow with hundreds of steps, deeply nested conditions, and loops inside loops handles an entire business process.
Why It’s Harmful
It is hard to read, test, and change, it hits the action limit, and one failure can block everything. Run histories become enormous.
Correct Approach
Split into small child workflows with clear contracts, and let a parent coordinate them.
Problem
Secrets, endpoint addresses, and keys are typed directly into steps and copied between environments by hand.
Why It’s Harmful
Secrets leak through run history and source control, and a copied workflow may silently call production from a test environment.
Correct Approach
Use parameters, app settings, and Key Vault references, and let the pipeline supply environment values.
Common mistakes and their fixes
| Mistake | What happens | Better habit |
|---|---|---|
| Polling every minute for rare events | High cost and wasted calls | Use push triggers or lengthen intervals |
| Looping over huge lists with web calls | Slow runs, throttling, large histories | Batch, filter, or hand to a queue |
| Ignoring duplicates | Double actions after retries | Idempotent design with unique keys |
| Leaving history open with sensitive data | Data exposure | Secure inputs and outputs, restrict access |
| Choosing stateless for long processes | No history and no long waits | Use stateful for business processes |
| Locking storage without network access for the app | Deployment and run failures | Plan private endpoints and DNS together |
| No alert on silence | Broken trigger goes unnoticed for days | Alert when expected runs do not occur |
| Editing production in the portal | Drift and lost changes | Deploy only through pipelines |
A pre-launch checklist
Design
Confirm hosting model, trigger type, workflow type, patterns, and limits for expected volume.
Reliability
Confirm retries, error branches, dead-letter handling, idempotency, and timeouts.
Security and network
Confirm identities, secrets, secured history, caller restrictions, and private paths.
Delivery
Confirm source control, parameters, pipelines, tests, and rollback plans.
Operations
Confirm logs, alerts, runbooks, owners, budgets, and review dates.
18Advantages, Trade-offs, and Alternatives
Every service has strengths and costs. Here is an honest look at what Logic Apps gives you, what it asks in return, and where neighbouring services fit better.
Advantages
- Fast development with a visual designer and hundreds of connectors
- Managed platform that scales without server administration, especially in Consumption
- Built-in support for retries, long waits, approvals, and state
- Strong enterprise integration, including B2B formats and transformations
- Flexible hosting from pay-per-run to dedicated, private, and hybrid
- Good fit with Azure identity, monitoring, policy, and pipelines
- New agent capabilities that reuse existing connectors and safeguards
Disadvantages / Trade-offs
- Not for heavy computation or very low-latency processing
- Costs can grow quickly with frequent polling, large loops, and chatty designs in Consumption
- Large visual workflows become hard to read and review without discipline
- Limits on actions, loops, payloads, and timeouts require design care
- Managed connectors have their own throttling and network paths
- Two hosting models differ in features, so migration between them takes effort
- Preview features and connectors change over time
Choosing among neighbouring services
| Need | Best fit | Why |
|---|---|---|
| Connect many systems with little code and good retries | Logic Apps | Connectors, state, and visual orchestration |
| Custom code, fast and complex logic | Azure Functions | Full programming power and low latency |
| Business-user automation inside Microsoft 365 | Power Automate | Aimed at makers and the Power Platform |
| React to resource events with routing | Event Grid | Lightweight event delivery |
| Reliable messaging and decoupling | Service Bus | Queues, topics, sessions, dead-lettering |
| Heavy data movement and analytics pipelines | Data Factory or Fabric pipelines | Scale and data transformation focus |
| Long-running code-based workflows | Durable Functions | Orchestration written in code |
Working together
The best designs mix these. A typical pattern uses Event Grid or a queue to start a workflow, Logic Apps to orchestrate and call connectors, Functions for tricky code, API Management for a safe front door, and Monitor for visibility. Do not force one tool to do every job. Pick each for its strength and keep the contracts between them clear.
Deciding with a simple test
When unsure whether Logic Apps is right, ask four questions. Is the main job connecting systems and coordinating steps? Does it benefit from built-in retries, waits, and history? Can the heavy logic live elsewhere? Can the team support it with source control and monitoring? Four yes answers point to Logic Apps. A no on the first suggests code or another service, and a no on the last suggests investing in practices before building more workflows.
19Real-World Scenarios
These short stories show how the concepts fit together in situations you may recognise.
Scenario 1: Invoice processing with approval
A finance team receives invoices by email. A workflow triggers on each new message, saves the attachment to blob storage, extracts fields with a document intelligence service, and checks the amount. Small invoices post to the finance system directly. Large ones go to a manager for approval, with a reminder after two days and escalation after four. Failures park the message in a queue and alert the team. Staff now touch only exceptions.
Scenario 2: Order integration for a retailer
A retailer’s web shop publishes orders to a queue. A stateful Standard workflow picks each order up, validates it, calls the stock and payment services, and writes to the ERP through a private network path. If payment succeeds but stock fails, compensation steps refund the customer. Tracked properties let support staff search by order number in a workbook.
Scenario 3: Partner EDI exchange
A manufacturer exchanges purchase orders and shipping notices with partners using standard EDI formats over AS2. Logic Apps decodes and validates each document against partner agreements, transforms it with maps, and sends acknowledgements. Documents that fail validation produce clear error reports to the partner, and a dashboard tracks message status by partner.
Scenario 4: Smart support triage
A support team receives thousands of free-form messages. An agent workflow reads each one, looks up the customer, searches the knowledge base, classifies the issue, drafts a reply, and creates a ticket. Refunds above a limit and anything touching personal data wait for human approval. Iteration limits cap cost, and weekly reviews compare agent decisions with human ones to tune instructions.
Scenario 5: Cleaning up a polling bill
A team finds a large bill from a Consumption workflow that polls a database every thirty seconds for new rows and finds nothing most of the time. They change the source to publish an event when a row is added, replace polling with a push trigger, and filter early. Cost drops sharply and latency improves from half a minute to a few seconds.
Scenario 6: Silent failure caught by an alert
An expired credential makes a nightly synchronisation fail quietly for a week in a team without alerts. After the incident, they add an error scope, an alert on any failure, and an alert if the expected run does not appear. They move the connection to a managed identity so that the credential cannot expire again.
flowchart TD
N[Need arises] --> T{Type of need}
T -->|Connect systems on events| A[Push triggers, queues, connectors]
T -->|Human decisions| B[Approval patterns with reminders and escalation]
T -->|Partner documents| C[Integration account, schemas, maps, AS2]
T -->|Judgement on free text| D[Agent loop with limited tools and approvals]
T -->|Private and regulated| E[Standard with private endpoints and hybrid options]
A --> G[Monitor, alert, and review regularly]
B --> G
C --> G
D --> G
E --> G
What these stories have in common
In every scenario, success came from decisions made early and habits kept over time. Teams that chose events over polling saved money and time. Teams that added error branches and alerts found problems before customers did. Teams that used identities instead of passwords avoided expiry surprises. Teams that kept workflows small and versioned could change them confidently. None of this needed exotic features, only clear ownership, sensible defaults, and regular review.
20Frequently Asked Questions
Short, direct answers to questions that beginners and busy teams often ask.
Consumption runs one workflow per logic app on shared infrastructure and charges per execution. Standard hosts many workflows in one app on dedicated compute, with stronger networking, local development, and plan-based billing.
They share many ideas and connectors, but Power Automate is aimed at business users in the Power Platform, while Logic Apps is aimed at developers and integration teams working in Azure, with more control over hosting, networking, and deployment.
It was retired on 31 August 2024. Microsoft directed customers to Standard, which offers dedicated, network-integrated hosting.
Stateful workflows save step data and history, support long waits and resubmission, and suit business processes. Stateless workflows run in memory, are faster, and suit short request-response flows. The type is chosen when you create the workflow in Standard.
Prefer built-in where available because they run inside the runtime and can use private networking in Standard. Use managed connectors for the wide range of services that have no built-in version.
Design the work to be idempotent using unique identifiers and checks, and use concurrency and message features carefully. Duplicates can come from retries and at-least-once delivery, so assume they will happen.
Wrap the main work in a scope, add a following scope that runs on failure to log, alert, and park the message, use sensible retry policies, and add alerts for failures and for missing runs.
Mark steps that handle sensitive data to hide their inputs and outputs, use secure parameters, store secrets in Key Vault, prefer managed identities, and restrict who can read history.
Yes, through the on-premises data gateway for managed connectors, through virtual network integration with a VPN or dedicated circuit in Standard, or through hybrid deployment near the systems.
Web calls have time limits that differ by hosting model, roughly two minutes in multitenant and a little under four minutes by default in single-tenant. Use an asynchronous pattern for longer work.
The documented limit has been five hundred actions per workflow, with a nesting depth of eight. Split large processes into child workflows, and check the current limits page.
They add an agent loop to Standard workflows. A language model receives a goal and a set of tools, chooses which to use, and repeats until done, with options for human approval. Agent Loop in Standard was announced as generally available in November 2025, with some further AI features in preview.
Keep workflow files and infrastructure templates in source control. In Standard, deploy infrastructure first and then package and deploy the workflows, supplying environment settings from the pipeline. In Consumption, deploy a template that contains the definition.
Replace polling with push triggers, filter early, avoid huge loops, use built-in actions, choose stateless where history is not needed, right-size Standard plans, limit monitoring volume, and cap agent iterations.
Alert on the absence of expected runs as well as on failures. Silence is often the first sign of a disabled workflow, an expired connection, or a broken trigger.
There is no one-click switch because the resource models differ. Export or rebuild workflows in Standard, rework connections, and test carefully. Choose the model with growth in mind to avoid rework.
21Summary and Key Takeaways
Azure Logic Apps is Microsoft’s managed service for building automated workflows that connect systems. A workflow starts with one trigger and continues through actions, conditions, loops, and scopes, using connectors to reach hundreds of services. The hosting model is the biggest choice: Consumption for small, occasional, pay-per-run automations, and Standard for steady, high-volume, networked, and team-built solutions, with App Service Environment and hybrid options for special needs. Reliable workflows use queues, retries, idempotent steps, error scopes, and dead-letter handling. Secure ones use managed identities, secured history, restricted callers, and private networking. Agent workflows add AI judgement on top of the same safeguards. Good teams treat workflows as code, monitor failures and silence, manage cost by avoiding needless polling, and keep up with change, such as the retirement of the Integration Service Environment and the evolving status of preview features.
Key Takeaways
- Choose the hosting model deliberately — Consumption for small and spiky work, Standard for many workflows, private networking, local development, and steady volume.
- Orchestrate, do not compute — keep heavy logic in code and let workflows coordinate steps, connectors, and waits.
- Design for failure — queues, retries, idempotent steps, try-and-catch scopes, dead-letter handling, and alerts for both errors and silence.
- Prefer identities to secrets — managed identities, Key Vault references, secured inputs and outputs, and restricted callers and history.
- Use patterns that fit the problem — request-response for short calls, asynchronous callbacks for long jobs, queues for bursts, sagas for multi-system processes, and approvals for people.
- Treat workflows as software — source control, parameters, pipelines, tests, and small child workflows with clear contracts.
- Watch limits, cost, and change — know concurrency and payload limits, avoid wasteful polling, govern with policy, and confirm retirements and preview states on official pages.