cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Read body data coming back from HTTP action

I am trying to find anything in the documentation when googling for this but unable to find any. I know it must be simple but, how do I read a specific value returned in JSON from the response body resulting from HTTP action? I got back the result successfully in HTTP action but I want to get only 1 value there and store it in a variable. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

If I'm understanding your question correctly, you should also be able to reference the value by using an expression like this:

body('HTTP_Action_name_here')?['body_element_name_here']

Without seeing your flow, I can't guess exactly what the expression would be, but hopefully you can fill in the gaps.

View solution in original post

2 REPLIES 2
Highlighted
Solution Sage
Solution Sage

Hello Team,

 

Here is what you need to do after the Send an HTTP request action -

 

 Initialize Variable for storing the parsed ID (that we are going to do in the next steps) - 

  • Add ‘Initialize Variable‘ action to initialize a variable of type, ‘String’ and name it ‘ID’
 

yashkamdar_3-1599773247332.png

 

 

 

 

 

 

 

 

Parse JSON to Save the ID from the JSON - 

  • For the ‘Content‘ in the image below, navigate to ‘Add Dynamic Content‘ line and choose the ‘Body‘ option inside the ‘Send an HTTP request to SharePoint‘ action.
  • For the Schema, paste the body of Get HTTP request. You will get this from the run history.

 

 
 

 

yashkamdar_4-1599773264437.png

 

 

 

 

 

 Apply to each

  • For the ‘Select an output from previous steps‘ in the image below, navigate to ‘Add Dynamic content‘ line and choose ‘Value‘ inside the ‘Parse JSON‘ action.
  • Then, add a ‘Set Variable‘ action and for the ‘Name‘, select ‘ID‘ from the drop down menu and for ‘Value’, navigate to the ‘Add Dynamic content’ line, and choose ‘ID’ inside the ‘ParseJSON‘ action.

 

yashkamdar_5-1599773276864.png

 

Let me share a video tutorial on my youtube channel that will help you understand this very easily.

 

Video tutorial - https://www.youtube.com/watch?v=VT20p_LBU28

 

Navigate to 14 minutes and 39 seconds over here, where I have done exactly the same thing that you want. Only thing is I am grabbing a different entity. You can grab ID by referring the same URL.

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Resolver III
Resolver III

If I'm understanding your question correctly, you should also be able to reference the value by using an expression like this:

body('HTTP_Action_name_here')?['body_element_name_here']

Without seeing your flow, I can't guess exactly what the expression would be, but hopefully you can fill in the gaps.

View solution in original post

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 (15,820)