Azure Logic Apps Tutorial [Practical Examples]


Azure

Author: Sahil Hulage
Reviewer: Deepak Prasad

 

Overview on Azure Logic Apps

These days, Serverless computing is one of the key terms in the Cloud. This is a PaaS (Platform as a Service). It allows us to deploy and manage individual code functions without a need to deploy and manage on the individual Virtual Machine (VM). Serverless architecture does not mean that we host applications without servers, but Serverless really talks about the PaaS.

Azure Logic Apps are configured within a web portal and can execute your logic without programming any code. This is simpler to administrate as you only need to manage the properties of these logic blocks in your workflow; but it is also less powerful as you cannot get as customized or granular as with Functions. However, many (over 200) connectors are plug-and-play, so Logic Apps are hardly limited. You pay per action or trigger, plus storage.

  • SaaS event processing
  • Timer-based or content-based triggers and routing
  • Data ingestion or transformation
  • Business Processes
  • Integration between Azure cloud services

 

Prerequisite

  • Azure Subscription
  • Azure LogicApp in Subscription
  • Visual studio and VS Code installed

 

Step 01: - Login to Azure Portal

First login to the Azure portal. And search for Logic App in portal and hit Create.

Azure Logic Apps Tutorial [Practical Examples]

 

Step 02: -  Configure Logic App and Select the right Plan

Next, We have as usual same wizard to fill like name resource group, Subscription etc. and it will be same for every resource creation in Azure.

Here we have two types of LogicApp Plan one is Consumption and one it Standard. Will go through Consumption plan in this article. Below is the short difference between consumption and standard plan.

 

Consumption Plan

In Consumption Plan first 4000 Actions free and henceforth each action would be $0.000025. its a pay-as-you-go pricing model that charges based on triggers and actions that are specified in a logic app. Running in a multi-tenant environment, this plan also leverages connectors, which provide users with access to SaaS applications and on-premise data sources. Every time a Logic App definition runs the triggers, action and connector executions are metered.

 

Standard Plan

Azure Standard plan is charged based on Compute vCPU $0.192/hour, Memory $0.0137/hour.
The Logic Apps Standard plan supports local development on Windows, Linux and Mac, offers a new layout engine that supports complex workflows and enables custom connector extensions. Leverage the containerized runtime to run Logic Apps locally, in the cloud or on-premises with virtual network capabilities. A single logic app can have multiple stateful and stateless workflows.

Azure Logic Apps Tutorial [Practical Examples]

 

And finally it will validate all our configurations and will give us option to review and create. After that give the name for logic app and region and hit Review + Create.

Azure Logic Apps Tutorial [Practical Examples]

 

Done. Our LogicApp is ready to work and configure. After creating new LogicApp it will ask us to use few readymade templates to test LogicApp and get our hands dirty.

Azure Logic Apps Tutorial [Practical Examples]

 

Step 03: - Create LogicApp Workflow using prebuild template

Here we will use template to delete older files less than 30 days in storage account. 

This use case we will use to delete our log files which we store in azure storage and we want it to delete after every 30 days. So this LogicApp will delete logs files which is older than 30days. with the help of this mechanism we will be able to save cost of storage and get rid of unwanted files automatically.

Azure Logic Apps Tutorial [Practical Examples]

 

Next, is to configure connection strings for Storage account. its obvious how our LogicApp would connect to storage account

Azure Logic Apps Tutorial [Practical Examples]

 

After configuring storage account it will show connected. and will show connection name.

Azure Logic Apps Tutorial [Practical Examples]

 

Step 04: -  Configure the Logic for our Logic App

In Next part will configure the real logic that will process our logic. as per the below image we have to configure the logic. Here you can we can set recurrence means how frequently it will check for older files. and  in value you can set the expiry like how older files should be like 30days old or 10days old.

Azure Logic Apps Tutorial [Practical Examples]

 

Here is the logic for deleting files on basis of condition is true or false.

Azure Logic Apps Tutorial [Practical Examples]

 

After that click on save button. Now, our LogicApp is configured and ready to run. In Overview screen we can see the run history. In Runs History we can see it run successfully or not.

Azure Logic Apps Tutorial [Practical Examples]

 

Step 05: - How to modify and edit Logic App Workflow

If we want to modify the logic and add another steps we can go to the Logic App Designer and their you can see and Edit.

Azure Logic Apps Tutorial [Practical Examples]

Azure Logic Apps Tutorial [Practical Examples]

 

In Logic App Code View we can see coding of this logic app that we have configured using GUI.

Azure Logic Apps Tutorial [Practical Examples]

 

In Versions, tab you can see multiple versions of logic app so if you want to roll back your older version you can go to the Versions and roll back.

Azure Logic Apps Tutorial [Practical Examples]

 

Step 06:- What are API Connections?

In API Connections we can see the Connections and strings that we have configured to connect with other azure services. you can configure Outlook, ADF, Data Factory other azure services and those connection strings are configured her under API Connections.

Azure Logic Apps Tutorial [Practical Examples]

 

Aright hope this article help you to understand basic development and deployment of LogicApp Using portal.

Summary

The significant advantage of serverless is that the user does not manage the servers, but the cloud service providers do. The Logic App is a logical container for one workflow you can define using triggers and actions. A trigger can instantiate a workflow, which can consist of one or many activities (actions). For instance, you can trigger a workflow by sending an HTTP request or schedule a workflow every hour to retrieve data from a public website. There are 200+ out-of-the-box connectors available for enterprise integration.

 

Advantages

  • Out-of-the-box connector reduces the integration challenges.
  • Easy to define the workflow – User can easily define the workflow with triggers and actions with user-intuitive GUI
  • Support for Enterprise applications – Logic Apps support integration with Office 365, Twitter, Dropbox and more
  • Easy debugging – User can easily debug the Logic App using Trigger and Run history
  • 200+ Connector available on azure.

 

Limitation

  • multi-tenant Logic App is 120 seconds that is 2 minutes.
  • Not able to configure complex workflow as its only connector based.

 

References

 

Sahil Hulage

Sahil Hulage

He possesses over 5+ years of experience as a Cloud Consultant, specializing in Azure DevOps and CloudLinux. With his expertise, he implements and optimizes cloud solutions, ensuring seamless operations and efficient resource management. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to admin@golinuxcloud.com

Thank You for your support!!

Leave a Comment