Common scenarios, examples, tutorials, and walkthroughs for Azure Logic Apps
Azure Logic Apps helps you orchestrate and integrate different services by providing hundreds of ready-to-use connectors, ranging from on-premises SQL Server or SAP to Azure Cognitive Services. The Logic Apps service is "serverless", so you don't have to worry about scale or instances. All you have to do is define the workflow with a trigger and the actions that the workflow performs. The underlying platform handles scale, availability, and performance. Logic Apps is especially useful for use cases and scenarios where you need to coordinate multiple actions across multiple systems.
To help you learn more about the many patterns and capabilities that Azure Logic Apps supports, here are common examples and scenarios.
Popular starting points for logic app workflows
Every logic app starts with a trigger, and only one trigger, which starts your logic app workflow and passes in any data as part of that trigger. Some connectors provide triggers, which come in these types:
Polling triggers: Regularly checks a service endpoint for new data. When new data exists, the trigger creates and runs a new workflow instance with the data as input.
Push triggers: Listens for data at a service endpoint and waits until a specific event happens. When the event happens, the trigger fires immediately, creating and running a new workflow instance that uses any available data as input.
Here are just a few popular trigger examples:
Polling:
Recurrence trigger lets you set the start date and time plus the recurrence for firing your logic app. For example, you can select the days of the week and times of day for triggering your logic app. For more information, see these topics:
The "When an email is received" trigger lets your logic app check for new email from any mail provider that's supported by Logic Apps, for example, Office 365 Outlook, Gmail, Outlook.com, and so on. For more information, see these topics:
The HTTP trigger lets your logic app check a specified service endpoint by communicating over HTTP.
Push:
The Request trigger lets your logic app receive HTTP requests and respond in real time to events in some way.
The HTTP Webhook trigger subscribes to a service endpoint by registering a callback URL with that service. That way, the service can just notify the trigger when the specified event happens, so that the trigger doesn't need to poll the service.
After receiving a notification about new data or an event, the trigger fires, creates a new logic app workflow instance, and runs the actions in the workflow. You can access any data from the trigger throughout the workflow. For example, the "On a new tweet" trigger passes the tweet content into the logic app run. To get started with Azure Logic Apps, try these quickstart topics:
- Quickstart: Create your first automated workflow with Azure Logic Apps in the Azure portal
- Quickstart: Create automated tasks, processes, and workflows with Azure Logic Apps by using Visual Studio
- Quickstart: Create and manage automated logic app workflows by using Visual Studio Code
Respond to triggers and extend actions
For systems and services that might not have published connectors, you can also extend logic apps.
- Create custom triggers or actions
- Set up long-running actions for workflow runs
- Respond to external events and actions with webhooks
- Call, trigger, or nest workflows with synchronous responses to HTTP requests
- Tutorial: Build an AI-powered social dashboard in minutes with Logic Apps and Power BI
- Video: Respond to Twilio SMS webhooks and send a text response
Control flow, error handling, and logging capabilities
Logic apps include rich capabilities for advanced control flow, like conditions, switches, loops, and scopes. To ensure resilient solutions, you can also implement error and exception handling in your workflows. For notification and diagnostic logs for workflow run status, Azure Logic Apps also provides monitoring and alerts.
- Perform different actions based on conditional statements and switch statements
- Repeat steps or process items in arrays and collections with loops
- Group actions together with scopes
- Author error and exception handling in a workflow
- Use case: How a healthcare company uses logic app exception handling for HL7 FHIR workflows
- Turn on monitoring, logging, and alerts for existing logic apps
- Turn on monitoring and diagnostics logging when creating logic apps
Deploy and manage logic apps
You can fully develop and deploy logic apps with Visual Studio, Azure DevOps, or any other source control and automated build tools. To support deployment for workflows and dependent connections in a resource template, logic apps use Azure resource deployment templates. Visual Studio tools automatically generate these templates, which you can check in to source control for versioning.
- Create and deploy logic apps with Visual Studio
- Turn on monitoring, logging, and alerts for existing logic apps
- Automate logic app deployment
- Sample: Connect to Azure Service Bus queues from Azure Logic Apps and deploy with Azure Pipelines in Azure DevOps
- Sample: Connect to Azure Storage accounts from Azure Logic Apps and deploy with Azure Pipelines in Azure DevOps
- Sample: Set up a function app action for Azure Logic Apps and deploy with Azure Pipelines in Azure DevOps
- Sample: Connect to an integration account from Azure Logic Apps and deploy with Azure Pipelines in Azure DevOps
Content types, conversions, and transformations within a run
You can access, convert, and transform multiple content types by using the many functions in the Azure Logic Apps workflow definition language. For example, you can convert between a string, JSON, and XML with the @json()
and @xml()
workflow expressions. The Logic Apps engine preserves content types to support content transfer in a lossless manner between services.
- How workflow expressions work in logic apps
- Handle non-JSON content types, like
application/xml
,application/octet-stream
, andmultipart/formdata
- Workflow Definition Language schema for Azure Logic Apps
Other integrations and capabilities
Logic apps also offer integration with many services, like Azure Functions, Azure API Management, Azure App Services, and custom HTTP endpoints, for example, REST and SOAP.
- Create a real-time social dashboard with Azure Serverless
- Call Azure Functions from logic apps
- Tutorial: Trigger logic apps with Azure Functions
- Tutorial: Monitor virtual machine changes with Azure Event Grid and Logic Apps
- Tutorial: Create a function that integrates with Azure Logic Apps and Azure Cognitive Services to analyze Twitter post sentiment
- Tutorial: IoT remote monitoring and notifications with Azure Logic Apps connecting your IoT hub and mailbox
- Blog: Call SOAP endpoints from logic apps
End-to-end scenarios
Customer stories
Learn how Azure Logic Apps, along with other Azure services and Microsoft products, helped these companies improve their agility and focus on their core businesses by simplifying, organizing, automating, and orchestrating complex processes.
Next steps
- Learn about connectors for Logic Apps
- Learn about B2B enterprise integration scenarios with Azure Logic Apps
Feedback
Loading feedback...