Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Connector Development
Answered

POSTing to a rest endpoint with xml body

(0) ShareShare
ReportReport
Posted on by 13

Sorry if this is a super beginner question but I have the following scenario:

Our hosted application has a RESTful API that I am fully able to do GETS and a POST (using multipart/formdata) using our custom connector imported from a working Postman export. The API documentation shows all the responses coming in as xml but either PowerAutomate or the API itself is translating to JSON on the response because they all work. One of the POST calls (there are only 2 in the whole API), though, seems to expect the body to be formatted in xml and I'm not sure how to do that with the custom connector or if that's even possible.

 

The body that's currently working in Postman is below:

 

 

 

 

<documents>
 <document _action="replace">
 <title>THIS IS THE TITLE</title>
 <file type="docx" size="29169" uploadGUID="f24acs37-7f5f-g6c4-8gda-agge0bfdcbfb6" />
 <entities>
 <entity globalID="7b550a55-8903-b87dd4a19ce3" _action="new" />
 </entities>
 <categories>
 <category globalID="6492751f4104-92e7-a921002bf884" _action="new" />
 </categories>
 </document>
</documents>

 

 

  • Verified answer
    mattaroon Profile Picture
    13 on at
    Re: POSTing to a rest endpoint with xml body

    Managed to get this one myself. On the Custom Connector where you add the Action by sample, use "" in the json part of the body and set the Content-Type to application/xml then save your connector.

     

    In your workflow, you then have to build the XML request and pass that as a string into the connector. Works for my use-case.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics