cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ExtremeLeadProg
Regular Visitor

http post - header issue?

I have a flow (several actually) where I need to take the data and post it to an external site. You can see how I have it set up here: screenshot-us.flow.microsoft.com-2020.08.12-12_37_39

 

It posts the data to the external site but the flow itself is always marked as "failed" as you can see here: screenshot-us.flow.microsoft.com-2020.08.12-12_38_24

 

After so many "failed" run the flow is automatically disabled which I don't want happening. What am I doing wrong? Thank you in advance for any help!

1 ACCEPTED SOLUTION

Accepted Solutions

@ExtremeLeadProg  You need to access to Windows hosting, I just created a collection in Postman and created a Custom Connector 😊.

 

Yes, you are right just an HTTP and it not working. You can report it to Power Automate support team.

View solution in original post

9 REPLIES 9
CFernandes
Super User
Super User

@ExtremeLeadProg To isolate the problem, can you please try the same request using a REST client such as PostMan or ARC.

 

If you get a successful response(200) in the REST client then the same should work in the Power Automate HTTP action

@CFernandes It seems to work ok in ARC: screenshot-nimbus-capture-2020.08.12-14_12_38

 

The specific error in flow says: Http request failed: 'The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.'.

 

This is what I have in there: screenshot-us.flow.microsoft.com-2020.08.12-14_16_32

@CFernandes Does that bug apply here? That is talking about an "HTTP request" trigger. I am talking about an "HTTP" post action. Maybe it is all tied together somehow?

 

Maybe I should have posted a screenshot of the entire flow. As you can see here it is triggered by a "HTTP request" but it posts a row into a google sheet, sends a couple emails and then also posts into another system fine ( though I was able to make those work ok by using GET ) and unfortunately where I want to post this data can't use GET:

 

screenshot-us.flow.microsoft.com-2020.08.12-14_47_58

@ExtremeLeadProg 

 

Can you please paste the details of the HTTP request in text(URL, Header, Body) so that I can try it on my tenant with the HTTP trigger.

@CFernandes Sure, thanks for checking, here you go:

 

Method - Post

URI - https://patrickkellyppl.pw/pk25883/form.php?form=1

Headers:

Enter Key: Content-Type

Enter Value: application/x-www-form-urlencoded

Body: CustomFields[1]=@{triggerOutputs()['relativePathParameters']['Firstname']}&email=@{triggerOutputs()['relativePathParameters']['Email']}&CustomFields[7]=@{triggerOutputs()['relativePathParameters']['Phone']}

 

You can replace body with something like this just to test: CustomFields[1]=Mike&email=test@test.com&CustomFields[7]=1234567890

 

Hopefully that is what you were looking for, thanks again.

Howdy @ExtremeLeadProg ,

 

Just checked with HTTP connector getting the same error.

 

CFernandes_0-1597338487895.png

 

So I decided to to create a PostMan collection(v1) exported it and tried creating a custom connector( You can refer my blog - https://clavinfernandes.wordpress.com/2019/11/01/soap-custom-connectors-in-microsoft-flow/)

 

And then used it in the Power Automate I got a response.

 

 
 

Untitled.png

 

The response body I get 

 

<html>
<head>
<style>
body {
margin: 0px;
}

#content {
border: 1px solid #EFECBA;
width: 300px;
height: 150px;
background-color: #FBFAE7;
padding:20px;
top: 50%;
left: 50%;
position: absolute;
}

#container {
width: 100%;
height: 100%;
font: 11px tahoma;
position: absolute;
top: -75px;
left: -150px;
}

</style>
</head>
<body>
<div id="container">
<div id="content"><b>An error has occurred.</b><br /><br /> An error(s) has occurred while trying to subscribe you to our contact list:<br /> <br/>-You are already subscribed to list Big Home Business <br /><br /> <a href="javascript&colon;history.back()">&laquo; Go Back</a></div>
</div>
</body>
</html>

 

Let me know if the above helps... 

 

@CFernandes Unfortunately, I do not have access to Windows hosting and this seems like a lot of trouble for something that should just work?

 

It's just a simple HTTP post, who do we contact to get extra help? I'm new here, is there a real support channel for Flow?

 

EDIT: I found the support channel and submitted a ticket let's see what they say, thanks for your help so far.

@ExtremeLeadProg  You need to access to Windows hosting, I just created a collection in Postman and created a Custom Connector 😊.

 

Yes, you are right just an HTTP and it not working. You can report it to Power Automate support team.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,167)