How to Send an email from Azure Data Factory on File Creation or Deletion in Blob Storage - ADF

Issue: How to Send an email from Azure Data Factory on File Creation or Deletion in Blob Storage 

In this article, we are going to learn how to send an email notification from Azure Data Factory on the creation or deletion of any file in blob storage, let's start our demonstration.

Open your Azure data factory studio, go to the author tab, click on the + sign to create a new pipeline, click on the white canvas and go to the Parameters tab, click on the + New button and create two parameters one for the file name and another one for the container name.


 Next, click on Add trigger, then click on the New/edit.


Name your trigger, select the trigger type, select your Azure subscription, select storage account name, provide container name, define blob path begins with, and ends with, select the event, then click on continue.


Provide value to the triggers, then click on Ok, then click on publish all and then publish the pipeline.


Next, Go to the Azure portal, find and go to the logic apps, click on the + New button to create a new logic app, select your Azure subscription, select the resource group name, select the type, name your logic app, select your region, click on Review + create then click on Create.


Once our logic app is created, open the logic app it will open the logic app designer, then click on Blank logic app.


Find and go to the Request.


Select ''when HTTP request is received''.


Define the request body JSON schema.


Select the method as ''Post''.


Next, click on the + New step.


Select the Email type, in my case, I am going with outlook.


Find and select ''Send an Email'', and then sign in to your provided account.


Once we are logged in, it will ask for the recipient, where we have to send the notification email, provide the email, then provide the subject of the email, then write the message, in my case I have mapped the parameters which we have created earlier, then click on save, once we save the information it will generate an URL link copy that URL and go to the Azure Data Factory.


In Azure data factory studio, find and bring the Web activity, go to the settings tab, paste the URL we copied from the Logic app, select the method, write expressions in the body, and then publish the pipeline.  




  

Video Demo: How to Send an email from Azure Data Factory on File Creation or Deletion in Blob Storage


 




No comments:

Post a Comment