One of the most common asks I’ve come across lately is people asking whether or not, we can make external HTTP requests using Flow in Power Automate. Well, yes! Let’s quickly take a look at how you can do that.
Scenario
To keep the example really simple, I have an API that I can use to call to get weather information. (By the way, you’ll find MSN Weather connector in Power Automate too)
So, the API I’m using to test the call is OpenWeatherMap. Their API is really easy to understand for this example.
Note: You can create your account here and you’ll get an API key which you can use.
- Now, Let’s say I have the API key and I’m ready to consume their API.
You can have your Flow start any which way you want, I’m just running it on schedule –
Select HTTP in the search and select the HTTP trigger
- Now, I can fill in the data required to make the HTTP call. In my example, the API is expecting Query String, so I’m passing the values in Queries as needed. It could be different in your case.
I’m select GET method since we are trying to retrieve data by calling the API
And then go on to write the rest of the request.
Let’s say, if you’re required to pass headers to a POST request with Body, you can do that as well. - And I’m capturing the response in a variable in Flow to further use it. I’ve chosen to store it in an Object type of variable.
Easy!
Making HTTP Request
Now, let’s test it. I made a sample request and I’ve received the response as below –
I’ll open my response part –
Check this, in case you want to also secure the data your receive – Secure Input/Output in Power Automate Run History
And I’ve received the data successfully! Hope this gets you started in making HTTP calls.
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
[…] Make HTTP request from Flow in Power Automate […]
LikeLike
What is the appid parameter you have mentioned in above HTTP request trigger?
LikeLike
It’s just a parameter required for the specific example I used which is OpenWeatherMap. Their request needs this, it could be anything else in your case.
LikeLike
yes I understand but just want to know how did you get this, means is this app registered in azure.
LikeLike
It’s not, it’s a service and they just provide us the URL that we can use. No Azure involvement here.
LikeLike
Ok My system’s api is not exposed publicly and they use Oauth authentication so I am not getting how authentication will work, is this something they will provide details or I need to do it.
Also Can i post request also from Flow to that system based upon my trigger in Dynamics 365
LikeLike
There are various ways you can implement authentication. Most common being the APIKey provided by the one who hosted the app. Which you can store somewhere and pass it in params which appears like I did. I’ll try to write an example soon on that some time soon.
And Yes, you can use POST verb to do so.
LikeLike