Monday, August 24, 2020

What is Azure Logic Apps

It help us to create business processes and workflows visually and integrate with SaaS and enterprise applications. Azure Logic App works based on the workflow defined. Logic Apps provide a way to simplify and implement scalable integrations and workflows in the cloud. It provides a visual designer to model and automates your process as a series of steps known as a workflow.

I have created a simple Logic App with help of visual designer. In this example, Every-time when I post new blog in “DJ Blogs” with help of RSS Feed connector. Email notification about new blog send to my Gmail account. 

DJ Blogs RSS feed url: https://blogs.deepakjoshi.info/feeds/posts/default

Gmail: Deepakjoshiinfo@gmail.com

How it works?

Every logic app workflow starts with a trigger, which fires when a specific event happens, or when new available data meets specific criteria. Many triggers provided by the connectors in Logic Apps include basic scheduling capabilities so that you can set up how regularly your workloads run. In our example each time when I post new blog trigger fires, the Logic Apps engine creates a logic app instance that runs the actions in the workflow. As result it send email to my Gmail account.

Azure Logic apps have four key components.

1.       Workflow

2.       Managed Connectors

3.       Triggers

4.       Actions

Workflow

Logic Apps provides a graphical way to model your business processes as a series of steps or a workflow. As you can see the above example 2 steps involve in workflow.

1.       Download new RSS feed from RSS feed URL.

2.       Send email to Gmail

Managed Connectors

A connector is a proxy or a wrapper around an API that allows the underlying service to talk to Microsoft Power Automate, Microsoft Power Apps, and Azure Logic Apps. It provides a way for users to connect their accounts and leverage a set of pre-built actions and triggers to build their apps and workflows. Logic apps need access to data and services. Managed connectors are created specifically for connecting to and working with data. Connectors allow connecting to 3rd party application to manage data and working with it. On-premise applications can be synchronization to cloud applications using connectors. As above example we are getting data from RSS feed. RSS feed is connector in this example. Logic Apps offers hundreds of connectors and you can choose any connector based on your requirement.

Triggers

Logic Apps provides built-in triggers and actions so that you can create schedule-based workflows, help your logic apps communicate with other apps and services, control the workflow through your logic apps. Some Managed Connectors can also act as a trigger. A trigger starts a new instance of a workflow based on a specific event, like some change in data source, arrival of an e-mail. As our example we are using RSS feed as connector and it has built-in “Schedule” trigger. We can set “Schedule” when we want download post in certain interval.

Action

The step after a trigger that makes something happen, such as sending an email. As above example after RSS feed downloaded then we will send notification to the user. We are sent email with help of Gmail.

Create Logic App

1.       Login in to the Azure portal

2.       Azure portal search box, enter logic apps, and select Logic Apps.


3.       On the Logic Apps page, select Add


4.       Logic App pane provide details about your logic app as shown below.

5.       Select the location based on where you want to save your logic app data

a.       Region: If we selected it ask for azure data center region name  

b.    Integration Service Environment: It is a fully isolated and dedicated environment for all enterprise-scale integration needs. When you create a new Integration Service Environment, it is injected into your Azure virtual network, which allows you to deploy Logic Apps as a service on your VNET

6.       When you're ready, select Review + Create. Confirm the details that you provided and select Create.

7.       After Azure successfully deploys your app, select Go to resource.

8.       Click on Templates, select Blank Logic App

9. To find the RSS connector, in the search box, enter rss. From the triggers list, select the RSS trigger, when a feed item is published.


10.   Provide the information for your trigger as described in this step


11.   When a feed item is published trigger, select New step

 

12.   If your selected email connector prompts you to authenticate your identity, complete that step now to create a connection between your logic app and your email service.


13.   In the Send an email action, specify the information to include in the email

14.   Run your logic app

15.   Sample email that this logic app sends

Technically, when the trigger checks the RSS feed and finds new items, the trigger fires, and the Azure Logic Apps engine creates an instance of your logic app workflow that runs the actions in the workflow. If the trigger doesn't find new items, the trigger doesn't fire and "skips" instantiating the workflow.


Introduction to Azure Logic Apps by Microsoft

Now we have successfully built and run our first logic app with the Azure portal. Hope it will help you to understand logic apps and how you can use them.

Keep sharing keep learning. Cheers 

2 comments: