How to call logic app in Azure function app

In this blog, we will see how we can trigger the logic app using the azure function app. Let’s start with creating a logic app (HTTP triggered) that sends an email when the logic app URL is hit in the function app.

Step 1: Create a logic app resource and start by adding an HTTP GET request trigger. Url will auto-generate after saving the logic app.

Step 2: Add send email block after that to receive an email

Step 3: now create a function app in visual studio by creating a new project.

Step 4: Add project name and now select type of function app, select the create option

Step 5: Add the below code to the auto-generated code template in the visual studio

var url = @"Enter your logic app URL";
WebRequest request = HttpWebRequest.Create(url);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());

Step 6: Run the function locally. then you will get URL in the command prompt copy that and paste it into your browser.

Step 7: After entering the URL you should receive an email as mentioned in the logic app.

In this way, the logic app triggered successfully using the function app

Hope this blog helps you.

Thank you!!


Share Story :