How to store HTTP Post Response(Text Format) in a Data Variable in Azure Logic Apps

Mohamed Faizal S 20 Reputation points
2023-01-23T21:52:34.8633333+00:00

I need to store HTTP Post Response(Text Format) in a next step data Variable in Azure Logic Apps. Please provide your inputs.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,344 questions
0 comments No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 23,781 Reputation points Microsoft Employee
    2023-01-25T09:23:26.97+00:00

    @Mohamed Faizal S Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    You can achieve this by using either of this of two ways.

    1. Using body function expressions in logic apps.
    2. Applying Parse JSON and using the initialize variable pulling specific property from the HTTP response output.

    Suppose for example, if the output of my HTTP POST request is below JSON and if I want to pull the "value" property and store it in the data variable.

    {
    	"Count": 11,
    	"Coverage": null,
    	"Facets": {
    		"ChannelDisplayName": [{
    			"Type": 0,
    			"from": null,
    			"to": null,
    			"value": "Microsoft Q&A",
    			"count": 11
    		}]
    	}
    }
    
    • If you are using body functions expression, then you need to use this expression body('actionname')?['Facets']?['ChannelDisplayName']?[0]?['value'] to pull the value property value.
    • If you are using Parse JSON action, it will be a tokenized value as shown below.image

    Feel free to reach back to me if you have any further questions on this.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.