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

Community site session details

Session Id : EyUD/Yx/YC45AiiFPHwOg0
Power Automate - Connector Development
Answered

POSTing to a rest endpoint with xml body

Like (0) ShareShare
ReportReport
Posted on 27 Mar 2023 16:43:31 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>

 

 

I have the same question (0)
  • Verified answer
    mattaroon Profile Picture
    13 on 28 Mar 2023 at 22:38:40
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 783 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 515 Moderator

#3
trice602 Profile Picture

trice602 299 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Loading complete