Microsoft Flow HTTP Trigger | A Power Automate Tutorial

One comment

A Microsoft Flow HTTP trigger allows users to trigger flows from third-party applications. In this tutorial, we’ll talk about how that trigger works to let the end-user initiate a flow. Microsoft Flow will serve as a bridge between your application and a large number of other services.

For example, we want to trigger our flow using an application that’s not available in Power Automate. If we’ve made our own web application and we want to trigger a flow from there, how do we do that?

This is a sample flow with some input fields that the user has to fill in.

What if we want a user to fill in these input fields from third-party applications? To do that, we need a URL endpoint that will be generated for us in this new flow. We’ll also need a JSON file also known as a schema that contains all the variables that will represent all the inputs we’re passing in.

Creating A Microsoft Flow With An HTTP Trigger

Let’s now create a simple flow using a Microsoft flow HTTP trigger. In this flow, the user will enter their first name and last name using a third-party application, and it will be posted as a Slack message.

1. Creating An Instant Flow

First, let’s go to the Create page.

Then, click Instant flow.

Instead of using the PowerApps or Manually trigger a flow option, we’ll use When an HTTP request is received as the trigger. So, let’s select that and click the Create button. 

Microsoft Flow HTTP Trigger

Flows created with the “When an HTTP request is received” trigger can be executed by anyone that knows the URL. 

HTTP requests are outside the scope of this tutorial. However, we can easily use this as a trigger for our flow because Microsoft will just create a link for us. Then, if our third-party application accesses the link, it will trigger our Power Automate flow by itself.

Microsoft Flow HTTP Trigger

The key thing here is that we’re just creating an endpoint where any third-party applications can connect to. If you want to trigger something from an email, Slack, or Trello, we don’t need to use this trigger because those connectors are available in Power Automate. You only use this technique if you want to trigger your flow from a connector that’s not available in Power Automate. 

2. Setting Up The Microsoft Flow HTTP Trigger

First, we need to identify the payload that will pass through the HTTP request. Click “Use sample payload to generate schema” and Microsoft will do it all for us.

Microsoft Flow HTTP Trigger

Let’s create a JSON payload that contains the firstname and lastname variables. As you can see, we also added a sample or temporary values “Joe” and “Axe” for the variables that we’ve created.

Microsoft Flow HTTP Trigger

Then click the Done button.

Microsoft Flow HTTP Trigger

Microsoft will then take that and create a request body JSON schema. This means when this endpoint is triggered, it expects two properties which are the lastname and firstname with their type as a string.

Microsoft Flow HTTP Trigger

Next is to add a new step by clicking the New step button.

Microsoft Flow HTTP Trigger

Then, search and click the Slack connector. 

Microsoft Flow HTTP Trigger

For the action, let’s use the Post message.

We’ll use the tutorial channel for the Channel Name.

For the Message Text, we can see on the Dynamic content that we now have the firstname and lastname variables.

This is because our endpoint expects two variables which are the firstname and lastname that we’ve created using the JSON text we added earlier.

Microsoft Flow HTTP Trigger

Click the concat expression to concatenate the firstname and lastname variables.

Then, let’s concatenate the word “Hello:” with the firstname

Let’s also concatenate it with the lastname. Make sure to add a comma after the word “Hello” and the variable fistname.

Then click the OK button.

Microsoft Flow HTTP Trigger

Let’s now save our flow by clicking the Save button.

Microsoft Flow HTTP Trigger

A URL will be generated which will serve as our endpoint. We can access it through our third-party application.

Microsoft Flow HTTP Trigger

Testing Our Microsoft Flow

Let’s now test our flow. I’ve installed an application called Postman. If you’re not familiar with this, it’s a way to access endpoints and pass values through to make sure that they work. 

Since we won’t talk about HTML, JSON, POST, and different web APIs in this tutorial, we can just use Postman to mimic those things for us. If you’re confused about POST or POST versus GET, I recommend watching a beginner or basic web development course so you’ll be familiar with those terms. I also suggest that you study what HTTP requests are because they really expand the possibilities for this application. 

To test our flow, copy this URL.

Then, paste that URL on the POST field in Postman.

Inside the Body, let’s change the default values with the variables that we’ve set to our JSON payload. So, let’s add the firstname and lastname variables with the values “Tom” and “Jerry”. We should be inside the Body and make sure to select raw. The type should be JSON.

C:\Users\Gel\AppData\Local\Microsoft\Windows\INetCache\Content.Word\26.jpg

Again, this Postman serves as our third-party application. This is just to make sure that the linkages are working correctly. 

On our flow, let’s now click Test.

Select the “I’ll perform the trigger action”, and click the Test button.

It will then start waiting for the action to occur.

So, we’ll now post it to our endpoint and see if it works by clicking the Send button.

Once our flow runs successfully, we can check our Slack to see if the message has been posted.

On our Slack, we should see the message Hello: TomJerry.

Conclusion

For this tutorial, we were able to form a trigger from a third-party application that has nothing to do with Power Automate. Microsoft has created the endpoint, variables, and everything we need. All we have to do is just access the link/URL ourselves. That’s how easy this was.

If you want to become a Power Automate administrator, then you need to learn how these things work. Once you integrate Power Automate with your company or your organization, there’s a chance that you’ll encounter third-party applications that don’t have connectors in Power Automate. This is the best way to handle these instances.

This is quite a complicated concept, but once you get a hold of it, you can make flows that are triggered from anywhere as long as you have an internet connection.

Henry

Membership Banne

***** Related Links *****
Power Apps Introduction: Definition, Features, Functions, And Importance
Power Automate Dynamic Content Overview
Microsoft Power Automate: Workflow Automation

***** Related Course Modules *****
Microsoft Power Automate Masterclass
Power Apps Masterclass
Dashboarding & Data Visualization Intensive

***** Related Forum Post Links *****
Need JSON File To Format The Button Text
Update JSON File
Web Content Parameters From Postman Dump
For more JSON text support queries to review see here….

1 comments on “Microsoft Flow HTTP Trigger | A Power Automate Tutorial”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.