Azure Logic App - In Practice


Inception
Hello everyone, today’s Article, we gonna build a comprehensive in practice azure logic app workflow that include multiple steps; Starting from accessing using URL request and creating blob file with passed value and e-mail notification.
This article is part of The Azure series, I use this series to publish-out Azure Projects & Knowledge.
Overview
Azure Logic Apps is a cloud platform where you can create and run automated workflows in, across, and outside the software ecosystems in your enterprise or organization. This platform greatly reduces or removes the need to write code when your workflows must connect and work with resources from different components, such as services, systems, apps, and data sources.
It’s an integration platform as a service tool provide you with the capability to build a business process workflow and integrations with multiple systems.
Let’s discover in practice 😉
Workflow Diagram
For this workflow we gonna use HTTP request as a trigger for our Logic app with passing a value for ‘name’ attribute, then using this value to create a blob txt file for an existing Blob Storage, then using blob change as a trigger for sending e-mail notification, at the end will print out a result of the process as a response for HTTP.
Prerequisites
- Azure Storage account, with basics blob configurations.
If don’t have Azure Storage account use sample config below to create a one.
Follow the next steps to implement this workflow together!
Azure Logic App in practice
Let’s go straightforward for our implementation step by step as follows:
Open-up you Azure portal, Press Create resource from the left bar, then search for Azure logic app service.
Specify your resource group name, and logic app name as follows.
Press Review & Create.
Open-up logic app resource created, then navigate to logic app designer.
Press add trigger, then specify Request for http request.
configure a GET request as follows, as well as configure a specific relative path with ‘name’ value.
- Press on Plus, then add an action, to create a new stage of our workflow, then specify Create blob.
- for Authentication type specify Logic Apps Managed Identity.
- For below error ensure that to enable managed identity as follows.
For Storage account name, Press Enter custom value and type your Storage account name.
For Folder Path specify a folder name for example I have a dir1 directory as follows.
For Blob name, press on Function symbol appears then specify Path Parameter name, then append .txt as follows screenshot,as well as the Blob content.
💡This in order to create a file with the provided name during access the URL followed by .txt- Press on Plus to add another action, then specify When a blob is added or modified (properties only) (V2).
Then set Blob configuration integrations as follows.
Press on Plus to add a new action, and now search for outlook, then Send an email.
Sign-in and follow the steps.
- Adjust the the required fields, below is an example.
Press on Plus to append out last stage, search for Response.
- Then add a Body value, below is an example.
Here’s our workflow steps, Now hit Save.
Then Run to test our workflow, then navigate to Run history for more details.
Avoiding this forbidden result we need to provide the right access for logic app to Azure storage account.
Navigate to Storage account, Then IAM, then add a role assignment.
Add role assignment one by one for the following roles.
Check For Assign Access to as Manages identity.
Then Select member, For Managed Identity specify logic app, then select your logic app.
Review & Assign.
Repeat these steps for other role.
Now, Navigate back to Logic app and Run again. ensure it’s successful.
Now, Let’s run using URL request, Navigate back to Overview, then copy The Logic app URL.
Past the URL in a new page and search for ‘name’ value then replace it with your name, and you should see a result as follows.
Check your e-mail, you should to receive an e-mail as follows.
Get back to Run history to view this run results.
Resources
That's it, Very straightforward, very fast🚀. Hope this article inspired you and will appreciate your feedback. Thank you
Subscribe to my newsletter
Read articles from Mohamed El Eraki directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mohamed El Eraki
Mohamed El Eraki
Cloud & DevOps Engineer, Linux & Windows SysAdmin, PowerShell, Bash, Python Scriptwriter, Passionate about DevOps, Autonomous, and Self-Improvement, being DevOps Expert is my Aim.