Back to blog
Understanding Parse JSON in Power Automate
Power Automate Understanding Parse JSON in Power Automate

Understanding Parse JSON in Power Automate

Y

Yohannes verified

  • 3 min read
  • 298

Comments: 0

When building flows in Power Automate, you'll frequently encounter data in JSON (JavaScript Object Notation) format. This is especially common when working with actions such as HTTP requests, Power Apps, SharePoint, Dataverse, and Compose.

While JSON is an excellent format for transferring data, it can be difficult to work with directly inside a flow. This is where the Parse JSON action becomes incredibly valuable.

What is Parse JSON?

The Parse JSON action transforms raw JSON data into a structured format that Power Automate can understand. Once the JSON is parsed, individual fields become available as dynamic content, making them much easier to use throughout your flow.

In simple terms:

Parse JSON allows you to access and use data from a JSON object without relying on complex expressions.


Why Use Parse JSON?

Without Parse JSON, accessing values from JSON often requires expressions like:

outputs('Compose')?['Email']

While this works, it can make flows harder to read and maintain.

After using Parse JSON:

  • Fields automatically appear as Dynamic Content.

  • Conditions become easier to configure.

  • Email templates are simpler to build.

  • SharePoint and Dataverse updates become more straightforward.

  • Flow maintenance and troubleshooting are significantly easier.


Example: Processing Order Information

Step 1: Sample JSON Data

Imagine a Compose action returns the following order information:

{
  "OrderID": "ORD-1001",
  "CustomerName": "Sarah Johnson",
  "OrderAmount": 450.75,
  "OrderStatus": "Pending"
}

Step 2: Add a Parse JSON Action

Insert a Parse JSON action into your flow.

Content: Select the output from the Compose action.

Schema: Use the Generate from sample option and paste the JSON above.

Power Automate will generate a schema similar to:

{
  "type": "object",
  "properties": {
    "OrderID": {
      "type": "string"
    },
    "CustomerName": {
      "type": "string"
    },
    "OrderAmount": {
      "type": "number"
    },
    "OrderStatus": {
      "type": "string"
    }
  }
}

Step 3: Use the Parsed Data

After parsing the JSON, the following fields become available as Dynamic Content:

  • OrderID

  • CustomerName

  • OrderAmount

  • OrderStatus

You can now:

  • Send an order confirmation email to the customer.

  • Create approval workflows based on the order amount.

  • Add conditions to check whether the order is still pending.

  • Update SharePoint or Dataverse records with the order details.

No manual JSON expressions are needed.


Common Scenarios for Using Parse JSON

You should consider using Parse JSON when:

  • Receiving JSON data from Power Apps.

  • Consuming data from external APIs using HTTP actions.

  • Working with nested objects or arrays.

  • Processing custom responses from Compose actions.

  • Dynamic Content is not automatically available.

When Not to Use Parse JSON

If Power Automate already exposes the fields you need as Dynamic Content, adding a Parse JSON action may be unnecessary. In such cases, you can use the available fields directly and keep your flow simpler.


Benefits of Parse JSON

Using Parse JSON provides several advantages:

  • Improves flow readability.

  • Reduces the need for complex expressions.

  • Makes debugging easier.

  • Enables Dynamic Content for JSON properties.

  • Simplifies working with API responses and Power Apps data.


Conclusion

The Parse JSON action is a powerful tool for handling JSON data in Power Automate. By converting raw JSON into a structured format, it allows you to access fields easily through Dynamic Content and build more maintainable flows.

Whether you're integrating with APIs, receiving data from Power Apps, or processing custom JSON responses, mastering Parse JSON can significantly improve the efficiency and reliability of your automation solutions.

Collaborative publishing

Build on this work

The author has not enabled new contributions for this item.

Discussion (0 comments)

Join the Discussion

Login to share rich-text comments and reply to other members.

No comments yet. Be the first to share your thoughts!