cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Steventran0502
Frequent Visitor

Parameters in Power Automate Desktop HTTP Post request

I'm trying to pass parameters into my HTTP POST request to a web API.

Using postman, I can easily set the parameter "batchDate" to be something like "2021-03-21T22:04:55.8299681-10:00". But i can't find how to do that in Power Automate Desktop.

 

I've tried passing into the headers: {batchDate:"2021-03-21T22:04:55.8299681-10:00"} or {"batchDate":"2021-03-21T22:04:55.8299681-10:00"} but i keep getting error message: "Failed to invoke web service: Specified value has invalid HTTP Header characters. Parameter name: name."

 

Can someone help me out?

7 REPLIES 7
fraenK
Memorable Member
Memorable Member

If you have one header only, then following works, otherwise create a list variable:

batchDate:2021-03-21T22:04:55.8299681-10:00
key:value

 

I tried that but didn't work. Getting error: No HTTP resource was found that matches the request URI ...

I do notice because it's a date time string, there's colon in the middle so there're multiple colons instead of 2. even if i omit the time portion, it's still giving me the same error. 

screenshot2.PNG

The error indicates that there is something wrong with the URL. Why is it plain http?

Steventran0502
Frequent Visitor

Its an internally developed api. Its not the issue with the link because im able to do Python,curl or Postman just fine. Just cant do it in Power Automate. 

Can you give an example of how you do it in a list? A list only have values so how do you specify key and value pairs?

fraenK
Memorable Member
Memorable Member

Try this test site and send a request with your header, works fine for me https://hookbin.com/

 

For a list, just create a new list and add the header key:value pair as a new item. It's basically just a cell per header row

Steventran0502
Frequent Visitor

Hi Fraenk,

 

Thanks for your help by providing me the tool for unit test. I was able to make it work. It turns out the API is looking for the parameter in the link, not the header. i'm good with this one.

 

Next thing I have to find out is how to attach text file to the request. HOpefully I can figure that out too, then my project will be completed! 

 

Much appreciate!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (67,032)