 Hello everyone, it's Daniel, OutZero Ambassador. In this video, I would like to show you how to integrate OutZero actions with Azure Functions available in the Azure Cloud. Before we start, let me just clarify. Azure Functions is serverless offering available in the Azure Cloud, which enables you to run your applications without worrying about underlying infrastructure. When it comes to the OutZero actions, you can use them to, for instance, call external web API once the user is created in the OutZero tenant. So in this specific video, I would like to show you how to call Azure Functions once the user is registered in the OutZero tenant. So let's see how to do it. Let me start with the Azure Function app source So as you can see currently on the screen, this is just a simple HTTP triggered Azure Function app. It means that we can send HTTP requests to this function app. This function app can do something with this request, can process this request and return HTTP response. So as you can see here, we want to send the user ID in the body of the request and we want to log this information. Of course, in a real-world scenario, you could call external system, you could create account in this system with this specific user ID provided from the OutZero. So this function app will be called once the user is registered in the OutZero tenant. So we want to send user ID in the request, we want to log this information and we want to return HTTP response. And that's it. So now let's go to the OutZero dashboard. Here is my OutZero tenant and dashboard where I can create new OutZero actions. So from the left side, we can click actions and then select flows. As you can see, we can create actions for different flows. So we can execute action when user is signing in, we can execute action before the user is created in the OutZero tenant, and also we can define action that will be executed once the user is registered in the OutZero tenant. So in this case, in this specific video, we will see how to call Azure Function app once the user is created in the OutZero tenant. So we will use post user registration flow. So right now, let me just show you really quickly what's happening in the Azure portal. Here it is, Azure portal and my Azure Function app where I deployed the source code that I showed you before. So before we can call this Azure Function app from the OutZero actions, we have to deploy it to the Azure cloud. In this video, I will not present how to deploy Azure Functions, but I want you to know that before I can call it from my action, I have to deploy it to the Azure cloud. So here is my Azure Function. When I click it from the left side, I can click functions. Here is my function that I created. I can click it. And here, here is the Get Function URL. So I will copy it because I will use this URL in the OutZero action, which I will show you just in a minute. Here is the OutZero dashboard once again. And from the left side, under Actions, we have to select Library. And this is the place where we can create new OutZero actions. We can either use one of the actions provided by OutZero, so existing action, or we can build our custom action in the OutZero dashboard. So as you can see here, we can provide the name for the action. We can decide when this action will be triggered. So there are those different flows I mentioned before. In this video, we will focus on the post user registration. So we want to call Azure Functions once the user is created in the OutZero tenant. And of course, we have to select the node runtime. So in this case, it's version 16. So here, under Custom tab, I already created the OutZero action. I called it Register User in External System. So let me show you this. I will click three dots here, and I will select Details. As you can see here, here is the source code of my action. So what will happen, this source code will be executed once the new user is registered in the OutZero tenant. So in this code, we want to get the user ID, so the ID of the newly created user in the OutZero tenant, and we want to call our Azure Function app with this user ID passed in the request body. So as you can see here, here is the URL that I copied from the Azure Portal, and I will paste this URL here to call my Function app with the user ID. So once the user is created in the OutZero tenant, then I will post the user ID to my Function app. So once the source code is ready, we can either save the draft of this OutZero action, or we can just deploy it to use it in one of the flows. So in this case, in the flow related to post user registration. So we have to click Deploy. I've already done it. And right now, we have to get back to Flows tab. And here we have to click Post User Registration. And this is the place where we can add different actions to this specific post user registration flow. So from the right side, if we select Custom tab, here we can see that there is my register user in external system, OutZero action. I can drag and drop it here before start and complete. And I can click Apply button. And right now, once the user is created in the OutZero tenant, OutZero will call Azure Function app to pass the user ID. So let's test this flow right now. Testing is really simple. From the left side, we have to select Getting Started. And then click Try it out. And here is the login page of my OutZero tenant. Let's switch to Sign Up tab. Let's provide the email. Let's provide some password. There are two additional questions. So let's provide the name of the band to be tester. And the instrument that I play is guitar. And let's click Sign Up. And right now, the user is created in the OutZero tenant. And also my Azure Function should be called. So let's check the Azure Function logs to see whether there is the user ID that I created right now. Here is the page with the logs from my Azure Function. And I can see here that my function was successfully triggered and received the ID of the newly created user. So let's copy this ID of the user. And let's check in the OutZero tenant whether such user exists. Here is the user management blade in the OutZero dashboard. And I can see that this is my newly created user. If I paste the user ID that I copied from the Azure Functions log, I can see that this is exactly the same user ID that was passed to the Azure Function. Great. So now we know how to call Azure Functions from OutZero Actions. I hope you enjoyed this video as much as I did. And you learned something interesting and helpful. If you would like to learn more about OutZero Actions, I encourage you to check the links provided in this video. Thank you so much for watching.