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 Automate
Unanswered

HTTP request

(0) ShareShare
ReportReport
Posted on by 6

Hi,

I am using power automate and creating a cloud flow and I’m trying to output the body and status code of my GET HTTP request, as XML then need to parse JSON and then output into a document.

I have put together a compose after my HTTP request with the following expression

xml(outputs(‘HTTP’)[‘statusCode’]?[‘body’])

However I am getting the below error message when trying to run the flow

InvalidTemplate. Unable to process template language expressions in action ‘Compose’. The template language expression cannot be evaluated because property ‘body’ cannot be selected. Property selection is not supported on values of type ‘Integer’.

Any help would be greatly appreciated

Thanks

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @TT126 

     

    The status code is integer and xml only accepts string and object as data type. You can try the following technique for this:

     

     

    Save the status code like this in a compose:

     

    Sundeep_Malik_0-1667592728523.png

    Then in another compose save with the expression: xml(outputs('Compose'))

     

    Just a question, why are you converting it to xml?

     

    If this works for you, you can accept it as the solution, and if you liked the explanation, you can give a thumbs up, it really helps.

    Thanks.

     

  • Ellis Karim Profile Picture
    11,691 Super User 2025 Season 2 on at

    Hi @TT126 ,

     

    I think the following will reference the status code:

    body('HTTP')?['statusCode']

     

    Example: body('HTTP')?['success'] references the success property below:

    {
     "success": true,
     "historical": true,
     "base": "GBP",
     "date": "2022-02-01",
     "rates": {
     "EUR": 1.200205
     }
    }

     


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

  • TT126 Profile Picture
    6 on at

    Hi @ekarim2020 ,

     

     Thank you for your assistance

     

    However when I try the expression you have advised, I am getting no inputs and outputs from the compose in my run history? 

    thanks 

  • TT126 Profile Picture
    6 on at

    Hi @Sundeep_Malik 

     

    Thanks for your assistance also 

     

    although when I try to run the flow I get an error on the compose 2 which states the below 

     

    Unable to process template language expressions in action. The template language function ‘xml’ parameter is not valid. The provided value cannot be converted to xml

     

    thanks 

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard