Parsing the flow data for debugging

Data for any run of a flow can be retrieved, parsed, and used for debugging purposes via the workflow() function. The data includes properties that identify the flow which can be used to identify the run and allow you to do things like a link to that particular run or send rich notifications when a flow runs.

To do this, there are a few steps involved that could be part of any flow.

  1. Add a Compose step and set its input to workflow().
    Screenshot of Power Automate workflow compose
  2. Then add a ParseJSON step and set its content to the Output of the previous step. We will set the Schema field empty to an empty object, {} for now as we will need to retrieve it first.
    Screenshot of Power Automate workflow Parse JSON
  3. To retrieve the schema of the workflow JSON, we will first need to save and run the flow.
  4. Next, view the output of the run and copy the resulting JSON.
    Screenshot of Power Automate workflow Parse JSON outputs for debugging
  5. Return to the flow and select Generate from Sample in the ParseJSON step. Paste the copied output and click done.
    Screenshot of Power Automate workflow Insert a sample JSON Payload window
  6. Doing this will generate a schema from the JSON output which looks like this. Tip: This can be done for any JSON response from an endpoint when you do not have the schema readily available.
    Screenshot of Power Automate Parse JSON outputs
  7.  From here you can use the data about the current run in the subsequent steps. In this example, the data is initialised as an object variable.
    Screenshot of Power Automate workflow Initialise variable details

About the author

Headshot photo of Breadcrumb staff member, Jennifer Linde.
Walter Leong

Walter has more than 10 years’ experience delivering solutions across the Microsoft ecosystem. He specialises in Power Platform and Azure-based solutions, application development, and system integration, combining expertise in Power Apps, Power Automate, Dataverse and Azure Synapse with strong development best-practice knowledge.

21 November 2021

Why choose us for your next project?

Choose Breadcrumb Digital for a partner who listens first, designs with purpose, and delivers with clarity. Our focus on user‑centred design, transparent communication and iterative delivery means you get solutions that aren’t just technically sound, but intuitive, sustainable and embraced by the people who use them every day.

With certified specialists, a proven track record across government and industry, and a commitment to real‑world outcomes, we can help you move forward with confidence.