Azure Logic App is a cloud service that helps you to define workflows using connector to consume APIs to schedule, automate and orchestrate business processes. Logic Apps will perform the sequence of actions defined in the workflow whenever a trigger gets fired, simplifying how you design and build scalable solutions to integrate apps, whether in the cloud, on premises, or both.
To build integrations with Azure Logic Apps you have several options available on the Azure connectors’ gallery, which includes basically all Azure services, Office365, Salesforce, Oracle, file shares etc.
For example, you can automate:
Every logic app workflow starts with a trigger that will fire when new data or a specific event happens. Connectors in Logic Apps provide many triggers including from a basic scheduling capability to advanced recurrences and events. A connector uses the external service’s REST or SOAP API to do its work, and it is a container for related triggers and actions.
These are a few examples of built-in triggers available:
An instance that runs the actions in the workflow is created by the Logic App engine each time the triggers fire. Those actions are processes that will perform the designated business task based on the data provided, including data conversion and workflow control, such as conditional statements, loops, and branching.
Each operation has inputs and outputs, so, basically, triggers and actions are functions calls to an underlying API operation. For example, let’s suppose that your company has released a new product and you want to monitor tweets mentioning your product, analyze the customers’ impression of it, and take action according to the result of this analysis.
Firstly, when a new tweet is posted a trigger takes the search string and returns the tweets that contain that string
The detect sentiment is a built-in text analysis action that takes in a string and returns the sentiment score between 0 and 1. Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment.
The result of an action is automatically available throughout the rest of the operations, this allows you to pass the result from one operation as an input to the next one. In our example, the result of the sentimental analysis will be the input for the condition action.
The condition action will check the value returned by the detect sentiment action and take a decision. If the score is greater than 0.7 the True path will be executed, which will connect and execute an insert statement in a SQL Server database, otherwise, the False path will be chosen, and it will send an email through the Office365 connection and post a message on Slack using the Slack connection.
Fully managed by Microsoft Azure with the capability to create serverless solutions, you can focus on the business logic, these services will automatically scale to meet your needs, making integrations or background processes faster and easy to deliver.
Of course, there are situations where the Logic App might not be the best option, such as the ones involving real-time requirements or complex business rules.
Finally, you have options in how to build your logic app, you can use the Logic Apps Designer, a graphical tool for creating the workflows in a design canvas that you can add a trigger or an action and visually configure it inside the Azure portal. Or, for more customizable or even to store your Logic App in your source code repository, you can create or edit logic apps definition in a JSON file that also allows you to deploy it using Azure CLI, PowerShell, Azure DevOps Pipelines, or choosing the “code view” editor on the Azure portal.
Azure Logic Apps is an interesting and powerful tool that might be worth looking at, specially whether you already work with an Azure environment and need to build integrations and/or background tasks.