Azure – Logic Apps

By | 16/02/2022

In this post, we will see how to create a Logic App to send an email when a new file is added in a blob storage.
But first of all, what is a Logic App?
From Microsoft web site:
Azure Logic Apps is a cloud-based platform for creating and running automated workflows that integrate your apps, data, services, and systems. With this platform, you can quickly develop highly scalable integration solutions for your enterprise and business-to-business (B2B) scenarios. As a member of Azure Integration Services, Azure Logic Apps simplifies the way that you connect legacy, modern, and cutting-edge systems across cloud, on premises, and hybrid environments.

We start going to the Azure portal and create a new Resource Group called rgplogicapp:


Then, we create a Storage account called storacclogicapp:


In this Storage account, we create a container called testlogicapp that we will use to upload files:




We create a Logic App called logicappfortest:



Then, using the Logic App Design, we will define the workflow for sending email when a file is added:





Now, we select a trigger for running the Logic App:


Then, we set parameters for the blob:


It is important remember that, we have to take the Storage Account Access Key from the Access Key menu of the Storage Account:


We add parameters for the Blob and the Logic App:


This step is completed and now, we add another step to get the file from the Blob Storage:


Finally, we add a last step to send an email with in attachment the file added in the Blob Storage:



After we signed in, we can define the email template:


We have done and now, we can save the Logic App and choose the name:


Finally, we come back in the Resource group, we select the Logic App and then we push the button “Run Trigger”:


Now, in order to check everything works fine, we will add two files in the Blob Storage:

FILE 1

Upload file



The Logic App runs every 10 seconds:


Finally, we check the email:


FILE 2

Upload file



The Logic App runs every 10 seconds:


Now, we check the second email:



Leave a Reply

Your email address will not be published. Required fields are marked *