Flow, Power Automate

Pass “reference” data from a parent Flow to a child Flow

If you ever wonder how to do this is the exact time to figure it out together.

These are types of user inputs you can pass to a child flow:

Child Flow user input types: Text, Yes/No, File, Number, Date.

What I was doing previously is passing a record ID as a Text input parameter then I was querying data using this ID. Like this:

Query record in a child Flow to workaround a pass parameter limitation

But if you query data in a parent Flow already or if you want to pass data from a trigger context …

Let’s say I found a much better way. It has got one tiny disadvantage which I will flag later. But in general, it’s a valid option.

I would like to pass a trigger context from the parent Flow to a child. I will pas it as Text but will JSON.

Calling from the parent Flow:

Pass parameters into a child Flow

Pass JSON to a child Flow

Because in the trigger output we’ve got the context in JSON format:

Trigger Output Body JSON

Then in the child Flow we add Parse JSON action and copy OUTPUTS body JSON from the parent Flow to the Generate from sample:

Parse JSON action

Now you’ve got properties from your parent Flow available in the child Flow:

Parse Parent JSON output

As I promised the disadvantage. As you can see it on the screen it only gives you attribute names not proper display names. But if you with it then you can use this approach to pass more data.

Simple!

3 thoughts on “Pass “reference” data from a parent Flow to a child Flow”

  1. There is another important gotcha with this method which makes setup a little more of a pain.

    When you paste your sample data to create the schema for the JSON parses, you MUST ensure your sample data has all desired fields populated. Any unpopulated fields will not become part of the schema and therefore will not be available for selection in the Flow.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s