Your ERP system is where all your data goes and then is distributed and helps to organize the chaos. JavaScript Object Notation or JSON can help make the organization of your data easier by delivering data in a format that is easier to digest. Plus, it requires very little coding experience.
JSON is a very common data format. It’s an open standard file format and data interchange format which organizes data into readable text, which is then used to transit and store data objects. Using this format, APIs are able to communicate with other systems, including Microsoft CRM, Business Central, and Dynamics 365. The Parse JSON tool allows you to interpret the data with whatever language you’re using. For example, when you use Parse JSON in Power Automate, raw data is changed into values, which are then used as content for your dynamic flow.
Using Parse JSON delivers a number of benefits. The tool requires very little coding experience and can quickly create a data flow in a more readable, convenient format. Plus, JSON has a wide range of supported browser compatibility, making it easy to support other browsers.
However, there are a few disadvantages to using JSON and specific situations where using the tool isn’t the right choice.
The Limitations of Parse JSON
One of the biggest limitations to using Parse JSON in Power Automate is the usage limit in the system. Power Automate has a usage limit of 5,000 API requests. Reading the licensing information clarifies that this doesn’t mean you can run the flow 5,000 times because the software system considers every flow action as an API request. Instead, a single flow has five actions which produces 1,000 runs per day when the per user plan is used. Power Automate also has a per flow plan that increases the usage limit to 15,000 API requests per day.
Additionally, each time an HTTP action is requested, the API requests are doubled, which can create more than you need. Presently, it’s not known whether Power Automate includes data operations or variables in the API request, but we’ll assume that they are for the purpose of this article.
An Example of Using the Parse JSON Action to Reference a Field
In situations when you’re not using the Parse JSON step to reference a field, you’d need to first use the expressions to reference the fields outside the HTTP request actions. To refer to a single value from a single array, you can take advantage of the outputs () function. The action name is imputed between these parentheses and the value path is put between square brackets like this:
Syntax: outputs(Action_Name’)?[‘field’]
Action: Get Books API request https://www.googleapis.com/books/v1/volumes?q=isbn: ‘9780143126560’
Return body (simplified):
{
"kind": "books#volumes",
"totalItems": 1536
}
If you’re looking specifically for the total number of items, we’d use this format:
outputs(‘Get_Books’)?[‘totalItems’]
For deeper insight, JSON can separate the value references using a forward slash, e.g. [‘totalItems/field’].
If you want data in an arrayed format, you’ll have to use the ‘apply to each’ action. This action changes the expressions of the data, and all that’s needed is to reference either the body of the request or the JSON field that is the array. Here’s an example:
Action Get Books API request: https://www.googleapis.com/books/v1/volumes?q=isbn: ‘9780143126560’
Return body (simplified):
{
"kind": "books#volumes",
"totalItems": 1536,
"items": [
{
"kind": "books#volume",
"id": "ebNDDwAAQBAJ"
},
{
"kind": "books#volume",
"id": "WXcHwzaUd4MC”
} ]
}
Finally, if you’re interested in getting the field kind, you’ll follow the steps used in the ‘apply to each’ action: outputs(‘Get_Books’)?[‘items’].
Next, you’ll use this information to return the kind for each array item: items(‘Apply_to_each’)?[‘kind’].
The action name that is placed inside the items function is the specific name of the ‘apply to each’ step. When you’re using these examples in your own system, don’t forget to replace the action name with your own.
JourneyTEAM is here to help you learn the ins and outs of JSON. No matter what you’re hoping to use JSON for, our team will provide all the support you need. Connect with one of our representatives today if you have any questions regarding the information above or want to learn more about JSON.
JourneyTEAM was recently awarded Microsoft US Partner of the Year for Dynamics 365 Customer Engagement (Media & Communications) and the Microsoft Eagle Crystal trophy as a top 5 partner for Dynamics 365 Business Central software implementations. Our team has a proven track record with successful Microsoft technology implementations. We have experts ready to answer your questions about the latest Power BI updates and how it helps your ERP business activities. Contact JourneyTEAM today!
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.