Search techniques

  • Orange belt
  • Standard
  • Tip 158

Return flow data to Power Apps as JSON

Quiz question

How do nested data get from a flow into a canvas app?

Solution

  1. A) With a separate output for every fieldWrong. Flat outputs cannot represent lists or nested records.
  2. B) As JSON text in one output, then ParseJSONCorrect. One text output carries any structure, and ParseJSON rebuilds it in the app.
  3. C) Through the Response action of the HTTP connectorWrong. For this case Respond to a Power App or flow is enough. You do not need Response.

What it is about

A flow often returns more than a single value to a canvas app, for example a customer with all their orders. Respond to a Power App or flow, however, only knows flat outputs like text, number or yes/no. Instead of creating dozens of fields, you build the result in the flow as JSON, for example with Select and Compose, and return it as one single text output. In Power Apps, ParseJSON reads the text back in. Without a type you get a dynamic value and convert fields with Text(), Value() or Boolean(). With a Type as the second argument you get typed records and tables directly. You do not need the Response action from the HTTP connector for this.

When to use it, when not

Use it

When the app needs lists or nested records from the flow.

Better not

With very large amounts of data. Then the flow stores the data in SharePoint or Dataverse, and the app reads it directly.

Most common mistake

Using fields from ParseJSON in formulas without converting them. Without a Type, ParseJSON returns dynamic values.

License

Standard Runs without a premium connector, so the license from Microsoft 365 is enough. Source on Microsoft Learn: Power Automate licensing FAQ. For your whole flow: License check.

Full tip on powerplatformtip.comPowerPlatformTip #158, with screenshots

Share

Short link: powerautomate.ninja/en/158

Source: PowerPlatformTip #158, Microsoft Learn: ParseJSON function.