 Hey guys welcome to SSVNitex, you still decide and today we are going to see one more Azure Data Factory interview question and answer. So this is very common interview question where interviewer wants to ask how we can send the notification to Microsoft team channel from an Azure Data Factory. So here we want to get the information of the execution of the pipelines inside the Microsoft team channel from Azure Data Factory. So how we can do that? Let me quickly go inside the Microsoft team first. And here as I have already created a channel which is the pipeline notification. So I am not going to show you how we can create the channel. So there is a lot of links available by which you can understand how we can create the channel inside the team. And after that here once we can see this three dot let me click on that and add a new channel under this pipeline notification. And let me call this as testing pipeline something like this and click on add. So it will be adding a new channel after the general so that we can see here. Now everything is okay. Now we can go on the apps and inside the apps we have to search for the incoming web book. So we can click on that and here we can see add to a team we can click on that. After that here we will be going to find out the pipeline notification and this is for the general category is showing. So let me try to search for the pipeline. So here we can see these two. So which is pipeline notification pipeline notification and under the general we want to keep or under the testing pipeline. So I am going to keep the testing pipeline tag. We need to click on this setup connector. So once we set up the connector it will be asking few more details here. So we need to fill all those details. So now here we can see to set up an incoming web book provide a name. So I am going to call the ADF testing notification as a name. After that here if you want to upload the image then we can upload but I am not going to upload any image here. We can click on this create. So it will be creating the incoming web book. So now we can see URL is up to date. We need to copy this URL because this URL is very important and it will be used later. Let me try to use this URL here. So we will be going to use this URL later don't worry for now. You need to remember like you have to copy this URL. After doing everything we can click on this done. So everything whatever is required inside the teams we have done that. Now let me click on this cancel and here we can see we have set up this incoming web book that we can see right here. Now we need to go into the Azure Data Factory and here we need to create a pipeline and this pipeline will be going to send the notification. So I am going to call this send notification and this is for the past if your pipeline got passed. So we can go with that. Now here what next we need to do? We have to declare few of the parameters and one of the variable. So these will be going to be used while sending the email notification. So if you can go here then I can show you like total 10 parameters need to be created. So let me try to create all these. So now here we have created all these parameters. So we have to specify the default value of few of those. So as we can see the team web book URL remember we have created the team channel where we have set up the incoming web book the URL that we have copied we have to specify right here. So let me try to copy this URL from here and paste over there. Now here we can see the name so under the name we can specify any name. So I am going to specify as a test. So let me call this as test trigger time I am not going to specify default value anything status we have to specify like status might be for the testing purpose only. So that will be the testing under the message I am going to say the message. This is executed with success. So this might be the message. Now we can see the subscription. So we have to provide the subscription in my case this is the subscription ID. But your case subscript ID would be different than the resource name in my case this is area of testing. So I am going to specify this but in your case that will be different. Rest we can leave as it is. So after specifying all these parameters we need to create one variable. And this variable will be holding about the body of the notification. So default value I am not going to specify anything on this. Now after doing everything here first we have to set up this message card. So this message card is a variable. So we have to set the value under the set variable activity. And in this set variable activity here we need to select the variable by which we want to specify the value. And under this values here we can go and this information that you could see here we have to copy and need to specify there. So what we are doing here. So this is the JSON format actually and it is having the categories like we are specifying the activity title as in pipeline execution alert. Then the subscription ID will be specifying in the notification section resource group data factory name and all these parameters will be going to specify there. So let me try to copy this. Don't worry as it is you have to use this code. So I will provide this code on the description of this video. So you can copy and use whenever you want to use. Let me click on OK. So after doing this we have to call the webhook activity. So webhook activity will be going to take the input from this set variable activity first and here we can go on the setting and in the setting here we can see the URL. So we have to specify the URL here. So how we can get the URL as remember we have already specified a parameter and where we have specified the URL. So let me try to search for that. So that is what team webhook URL we can select that here click on OK. Now for the body we have to use the message card. So let me try to go inside the variables. So this message card we need to use. But the format of this that should be in the JSON format. So we have to convert the existing format with the JSON one. So we can specify like this. Now click on OK. So here we have done each and everything. Next we can use this pipeline that we have created right here. So let me try to save this pipeline first and we will create a new pipeline and on that pipeline let me call this pipeline like call notification for teams now. So here go back to here and let me try to call the execute pipeline and this pipeline will be going to call the pipeline that we have created right here for send notification for past. So if your pipeline got executed with success for example here I am using the wait activity if we are connecting with success then it is calling the pipeline which is the notification one. So let me try to click on this debug and we will check whether this is executing and notification is sending over the team channel or not. Similarly we can create another one and where we will be setting everything for the fail. So as we can go here and under the parameters here as we can see we have specified the values like the status as testing here I have specified it should be passed something like that. And here we can see the message. So this is executed with success we can specify with the failure. So such type of changes you can make and on the pipeline level once we will go then we can set up on the failure side. So this is in progress we have to wait until this will not be executed. So now here as we can see we got this notification and notification is saying the title which is the pipeline execution alert if we will try to compare with the JSON that we had here. So let me try to compare with the notification that we can see. So it is saying the pipeline execution alert. So the same thing that we have here now we have the subscription ID. So next is the subscription ID we are picking then the resource ID we are picking then the data factory name we are picking and after that the pipeline run ID is there so we can also see like the run ID is blank here because we did not specify the run ID over here. If you can scroll down then we can see the blank if we will specify right here so it will be picking the values from there. The next one we can see the pipeline name so pipeline name here we can see the test so because we have specified the test inside the parameter and after that the pipeline status I have specified the testing so it should be the past I made this mistake so that's why we can see the testing here. After that we can see the execution start finish execution duration message and everything we can see from there. So we can see all these values here. So this is the JSON by which we are getting the notification there. If we are removing any one of these so the notification for that section will not be the part of here. So as we can see the notification if you want to see the view pipeline run then we can click on that directly so it will be going to open the Azure data factory directly and we can audit directly inside the Azure data factory as well. So I hope guys you have understand how we can send the notification to the Microsoft team channel from the Azure data factory. If you have still any doubt on this you can comment your questions in the comment section I will try to response. So interview generally ask this flow that we have done over here. Thank you so much again see you in the next video.