When you are using Power Automate for some time, you will reach at point where you want to reuse a flow. Especially coming from programming background, the reuse of flow comes naturally to your mind. It is like a function or method call.
Nevertheless it is not that intuitive to reuse flows in Power Automate. This guide shows you click by click how to create a parent flow with a Power Automate child flow.
Parent and child flow setup
In case you just want to know what you have to care about, here it is:
- You need a solution: Parent and child flow need to be in the same solution
- Parent flow: Use ‘Run a Child Flow‘ to trigger the child flow
- Child flow: Use ‘Respond to a PowerApp or flow‘ to pass data to the parent flow
Step by step: How to use Power Automate child flows
Understand everything it takes to reuse a flow. This very simple example shows you the necessary steps without adding unnecessary complexity.
You will learn how to:
- Create a solution
- Pass data from the parent flow to the child flow
- Pass data from the child flow to the parent flow
This guide shows you exactly how to create a solution, a child flow and a parent flow. The parent flow passes a number to the child flow. The child flow duplicates this number by 2 and passes the result to the parent flow.
-
Create a new solution
Click ‘New Solution’
-
Give your solution a name and select a publisher
Create your solution
-
Click on your solution
Select your solution
-
Add a flow to your solution
New Instant Flow
-
Create the child flow
Create flow
-
Add an input
Click on ‘Add an input’
-
Select type number for your input
Click on Number
-
Add a new step
Click on ‘New step’
-
Add ‘Respond to a PowerApp or flow’ operation
Respond to a PowerApp or flow
-
Add an output
Add an output
-
Select type Number
Click on Number
-
Enter expression: mul(triggerBody()[‘number’],2)
Set expression for output
-
Save flow
Click save
-
Go back
Go back
-
Add another flow
Create flow
-
Add an input
Add an imput
-
Select type Number
Click on Number
-
Select operation ‘Run a child flow’
Run a Child Flow
-
Select your child flow
Child flow selection in Run a Child Flow
-
Pass the number of your trigger to the child flow
Set input of Run a Child flow
-
Save flow
Click ‘Save’