Run A Power Automate Flow With An HTTP Request

Hey, there! In this tutorial, we will learn how to create a web API from Power Automate, so that we can use it from any application.

Part 1. Create the Power Automate flow.

As a first point, let's create an empty workspace of type Automated Cloud Flow:

Now, let's look for the trigger called: When a HTTP request is received, which will allow us to activate the flow when an HTTP request is made to this process.

Then, we will need to define the JSON format of our schema for the API. For this, we can use an example by using the option: Use sample payload to generate schema:

{
    "emailAdress": "[email protected]",
    "emailSubject": "Hi from Power Automate",
    "username": "esdanielgomez"
}

By accepting, the schema will have been generated according to the example and now we can use those variables in subsequent actions of the flow.

Since in Power Automate it is a requirement that there is a trigger, and at least one action, now we are going to add an action that allows you to send an email according to the data received in the web API:

Finally, when saving the flow, the endpoint of the web API will be visible:

Part 2. Test Power Automate flow

With all this, now we can call our flow through an HTTP post from any application. Here we can see an example from Postman and email as a result:

Thanks for reading.

I hope you liked the article. If you have any questions or ideas in mind, it'll be a pleasure to be able to communicate with you and together exchange knowledge with each other.

See you on Twitter / esDanielGomez.com!

Regards!


Similar Articles