Logic Apps Documentation
Logic Apps is Azure’s serverless integration service that lets you design, automate, and orchestrate business processes without writing code. This guide covers key concepts, how‑to steps, and best practices.
Contents
Overview
Logic Apps provides a visual designer for building integration workflows that connect SaaS services, on‑premises systems, and cloud resources. Workflows are composed of triggers, actions, and control statements.
Key features:
- Built‑in connectors for over 300 services.
- Serverless consumption model – pay only for executions.
- Integrated with Azure Functions, Event Grid, and Service Bus.
- Rich monitoring via Azure Monitor and Application Insights.
Getting Started
Follow these steps to create your first Logic App.
- Open the Azure portal and click
Create a resource
. - Search for
Logic App
and select Logic App (Consumption). - Fill in the required fields (Subscription, Resource Group, Name, Region) and click Create.
- Once deployed, open the Logic App Designer and choose a trigger (e.g.,
When an HTTP request is received
). - Add actions by searching the connector gallery.
- Save and run the workflow.
For a video walkthrough, see the Quickstart tutorial.
Triggers
Triggers start a Logic App run. They are either Polling (e.g., checking a mailbox) or Webhook (e.g., HTTP request).
Common Triggers
When a HTTP request is received
– webhook trigger.Recurrence
– run on a schedule.When a new email arrives (V3)
– Office 365 connector.When a blob is added or modified
– Azure Blob Storage.
Example of a HTTP trigger definition:
{
"type": "Request",
"kind": "http",
"inputs": {
"schema": {
"type": "object",
"properties": {
"name": { "type": "string" }
}
}
}
}
Actions
Actions perform tasks after a trigger fires. They can be data transforms, conditionals, loops, or external service calls.
Control Actions
- Condition – if/else branching.
- Switch – multiple case branching.
- For each – iterate over an array.
- Scope – group actions for error handling.
Built‑in Connectors
Use the search bar in the designer to discover connectors such as:
- Azure Functions
- SQL Server
- SendGrid (email)
- Azure Service Bus
Pricing
Logic Apps offers a consumption‑based pricing model where you pay per action execution and per trigger use.
Component | Cost (USD) |
---|---|
Standard connector action | $0.000025 per action |
Enterprise connector action | $0.001 per action |
Trigger (standard) | $0.000025 per trigger |
Integration Service Environment (ISE) | Dedicated pricing (see Azure calculator) |
Use the Azure Pricing Calculator to estimate monthly costs.
Monitoring & Debugging
Logic Apps integrates with Azure Monitor, providing run history, metrics, and alerts.
- Run History – view each execution, inputs, outputs, and status.
- Diagnostic Settings – stream logs to Log Analytics or Event Hub.
- Alerts – configure alerts on failed runs or high latency.
Enable Application Insights
for deeper telemetry:
az logicapp update \
--resource-group MyResourceGroup \
--name MyLogicApp \
--set properties.integrationServiceEnvironmentId=/subscriptions/.../resourceGroups/.../providers/Microsoft.Logic/integrationServiceEnvironments/... \
--set properties.diagnosticSettings=[{name:'MyInsights',properties:{workspaceId:'/subscriptions/.../resourceGroups/.../providers/Microsoft.OperationalInsights/workspaces/MyWorkspace'}}]
Sample Workflows
Below are ready‑to‑import JSON definitions for common scenarios.
1. Email-to-Teams Notification
{
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"When_a_new_email_arrives": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "get",
"path": "/v2/Mail/Inbox/Message",
"queries": { "fetchOnlyUnreadMessages": true }
}
}
},
"actions": {
"Post_to_Teams": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['teams']['connectionId']"
}
},
"method": "post",
"path": "/v3/conversations/@{triggerOutputs()?['body/ConversationId']}/activities",
"body": {
"contentType": "html",
"content": "New email from @{triggerOutputs()?['body/From/EmailAddress/Name']}: @{triggerOutputs()?['body/Subject']}"
}
},
"runAfter": {}
}
}
}
2. Daily Data Sync to Azure SQL
{
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"triggers": {
"Recurrence": {
"type": "Recurrence",
"recurrence": { "frequency": "Day", "interval": 1 }
}
},
"actions": {
"Get_blob_content": {
"type": "ApiConnection",
"inputs": {
"host": { "connection": { "name": "@parameters('$connections')['azureblob']['connectionId']" } },
"method": "get",
"path": "/v2/datasets/default/files/@{triggerBody()?['fileName']}",
"queries": { "format": "json" }
}
},
"Insert_into_SQL": {
"type": "ApiConnection",
"inputs": {
"host": { "connection": { "name": "@parameters('$connections')['azuresql']['connectionId']" } },
"method": "post",
"path": "/datasets/default/tables/TargetTable/rows",
"body": "@body('Get_blob_content')"
},
"runAfter": { "Get_blob_content": [ "Succeeded" ] }
}
}
}