1. In the top search bar of the Azure Portal, Type as logic apps and select.
2. In the next window click Add -> Consumption
3. Click Review + create then create
4. Under the created Logic Apps click View in Logic Apps designer
5. We need the HTTP request ("When a HTTP request is received") as the trigger, since we're going to use the Web Activity in ADF to start the Logic App. From ADF, we're going to pass along some parameters in the HTTP request, which we'll use in the e-mail later. This can be done by sending JSON along in the body of the request.
6. Use the below Jason schema
{
"properties": {
"BodyTitle": {
"type": "string"
},
"Color": {
"type": "string"
},
"EmailTo": {
"type": "string"
},
"ErrorLine": {
"type": "string"
},
"Message": {
"type": "string"
},
"Status": {
"type": "string"
},
"StatusNote": {
"type": "string"
},
"Title": {
"type": "string"
}
},
"type": "object"
}
7. Click on New step to add a new action to the Logic App. This new step will design the email that needs to be sent. When you search for "Initialize Variable", you can find this action:
8.Name: Email Body
Type: String
Value: (refer the below HTML/CSS)
<style>
table {
font-family: Tahoma, Verdana, Segoe, sans-serif;
border-collapse: collapse;
width: 100%;
}
th { border: 1px solid #000000; text-align: left; padding: 8px; background-color: #DCDCDC; }
td { border: 1px solid #000000; text-align: left; padding: 6px; }
tr:nth-child(even) { background-color: #dddddd; }
i{ font-weight: bold; font-color: white; background-color: #E3E3E3; }
</style>
th { border: 1px solid #000000; text-align: left; padding: 8px; background-color: #DCDCDC; }
td { border: 1px solid #000000; text-align: left; padding: 6px; }
tr:nth-child(even) { background-color: #dddddd; }
i{ font-weight: bold; font-color: white; background-color: #E3E3E3; }
</style>
9. You can select the defined values in the Jason code from the dynamic content.
10. Click on New step to add a new action to the Logic App. This new step will send the e-mail. When you search for "mail", you'll see there are many different actions:
11. Save your Logic Apps.
Send Notifications from an Azure Data Factory Pipeline
12. Go to your Azure Data Factory
13. Select your Pipeline that you want to notify the result.
14. Add to Web activities and rename them: one for success and other for failure. Refer the image below:
15. Go back to your Logic apps you created and copy the HTTP POST URL in the When a HTTP request is received Step.
16. In the ADF pipeline Select the failure notification Web activity.
17. Paste the copied Value for URL and fill out the rest of the values as shown below:
Method: POST
Headers:
a. Name: Content-type
b. Value: application/json
18. Click the Body to enter the value:
Use the below:
{
"Title":"Pipeline Executions",
"BodyTitle":"Pipeline Execution was failed.",
"StatusNote":"in Error.",
"ErrorLine":"We will get back to you with the root cause.
For more details please contact the support team ",
"Color":"Red",
"Status":"Failed",
"EmailTo":"user@company.co"
}
19. Select the success notification Web activity.20. Follow the step 17
21. Click the Body to enter the value:
Use the below:
{
"Title":"Toyota UAT - Pipeline Executions",
"BodyTitle":"Pipeline Execution was successful.",
"StatusNote":"Successful.",
"Color":"Green",
"Status":"Succeeded",
"ErrorLine":,
"EmailTo":"user@company.co"
}
22. Execute the pipeline and check whether you are getting the Email as per the result of the execution to the configured "EmailTo" value as in the Body.









