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

BadRequest Error for "When a HTTP request is received" with $formdata

I'm having trouble with the "When a HTTP request is received" premium trigger.  I think that the problem is rooted in the fact that the POST request that should trigger the event is given as formData.

 

I followed the instructions here which works wonderfully for the test data that I had

https://medium.com/@edmyersjr/a-better-way-to-work-with-form-data-in-microsoft-flow-triggers-214c7f8...

 

But then for some unknown reason after a save the trigger stopped working properly and now continually gives me a "There's a problem with the flow's trigger. Fix the trigger , Learn more" error message on under the run history without even logging that the run failed.  I set up a capture on pipedream.com to ensure that the messages were coming through correctly and they were coming through correctly structured and consistent with when I was expecting them, just power automate does not seem to be able to handle them anymore.

 

Any help is appreciated.   Is there a way to fix this or is there an alternate to the HTTP Request that will handle form data correctly?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Pstork1 I must apologize. I believe that you were on the right track with the connection/authentication issues.  After recreating the flow I found that as soon as I added a SharePoint connector it started failing with the bad request error.  My final solution was to split the process into two where the first flow receives the request with form data and extracts the relevant parts, it passes these to a second flow through a second HTTP request trigger with a proper JSON body which is parsed and passed to other steps which require connections (in my case creation of a SharePoint list item).

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

Check the connection being used by the Trigger.  In my experience this error usually happens when security in the connection fails and needs to be re-authorized.  Click the ellipse, three dots on the upper right of the trigger, and make sure the connection that is checked doesn't say invalid connection.  If it does click on the invalid and re-authenticate the connection. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

There is no connection for the trigger it is a 'When a HTTP request is received' trigger which requires no special permissions or connections just waits for an event to be posted to the provided URL.

@Pstork1 I must apologize. I believe that you were on the right track with the connection/authentication issues.  After recreating the flow I found that as soon as I added a SharePoint connector it started failing with the bad request error.  My final solution was to split the process into two where the first flow receives the request with form data and extracts the relevant parts, it passes these to a second flow through a second HTTP request trigger with a proper JSON body which is parsed and passed to other steps which require connections (in my case creation of a SharePoint list item).

View solution in original post

Highlighted
Dual Super User III
Dual Super User III

Glad you were able to work it out.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

 


@AndrewRedd wrote:

  My final solution was to split the process into two where the first flow receives the request with form data and extracts the relevant parts, it passes these to a second flow through a second HTTP request trigger with a proper JSON body which is parsed and passed to other steps which require connections (in my case creation of a SharePoint list item).


While this works round the problem, surely it also indicates a bug in the MS Automate Flow implementation doesn't it? If the trigger works *before* you add in your SharePoint step, then it makes no sense that it returns "BadRequest" on adding in a step downstream from the trigger firing?

 

(I have exactly the same problem!)

Highlighted

I have the same exact problem too. Have you found any workarounds? I would prefer to keep everything in one flow! Definitely a Microsoft Bug.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (6,025)