web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / content-type error whe...
Power Automate
Unanswered

content-type error when a HTTP request is received

(0) ShareShare
ReportReport
Posted on by

I'm trying to build a flow based on the "when a HTTP request is received" trigger.

The payload of the HTTP request is xml, which I will parse with xpath in the subsequent actions.

I have left the "Request Body JSON Schema"-field blank: PowerAutomate should accept the payload even though it is no json.

 

I've successfully built this kind of flows in the past, but this time the trigger returns "Badrequest", and the application which sends the request receives the following message: The input body for trigger 'manual' of type 'Request' must be of type JSON, but was of type 'application/xml'

 

Is this no longer supported?

According to this article, it is still supported on LogicApps, so I guess it should be on PowerAutomate either: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-content-type

Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @Anonymous ,

     

    If you are leaving request body json schema blank how will parser know that input that you are trying to send is of JSON or xml type. If you can give it a try by adding sample xml and executing it via postman.

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    The request contains a content-type header which is used by the parser. If the content-type is application/json, the parser creates a json-object based on the schema. If the content-type is application/xml, the parser creates a json-object with a body-parameter which contains the complete xml-input. In the subsequent actions one needs to parse this xml with xpath.

    I've created this kind of flows before without any problems, but this time it fails.

    Seems like Microsoft no longer accepts non-json content-types.

  • Community Power Platform Member Profile Picture
    on at

    Yesterday I did some more investigation:

     

    My flow consists of the following steps:

     

    • A “When a http request is received”-trigger which is called by another application and which receives an xml-payload
    • Several “compose”-actions which extract the data from the xml-payload by the means of xpath
    • A “Insert row (V2)”-action to inject the data into an SQL-database

     

    I tried some things and evaluated them step by step:

     

    • As soon as I deleted the “Insert row (V2)”-step the flow ran without any problems
    • When I re-added that step, the flow failed
    • When I replaced content of the sql-fields by arbitrary data instead of the extracted xml-data the flow still failed
    • When I replaced the “when a http request is received”-trigger by a “when a button is pressed”-trigger, the flow ran without any problems

     

    Conclusion: the flow only fails when a “When a http request is received”-trigger is combined with a “Insert row (V2)”-action.

     

     

    This conclusion can be confirmed by the following fact:

     

    I’ve created this kind of flows before, I never ran into problems.

    These flows use the depreciated “Insert row”-action instead of the “Insert row (V2)”-action to inject the data into an SQL-database.

    So I copied the depreciated action from one of my old flows to my new flow and the flow ran without any problems.

     

    At the moment my problem is solved, but it deserves some attention from Microsoft.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard