Blog

Power Automate ChildFlows

9 April 2024
It may happen that we need to execute the same action in several different Flows. In order to avoid repeating the action, and also for maintenance reasons, it is preferable to create “Child Flows”.
A false trick could be to use the http connector to trigger a Flow, but the level of integration is not the same. In addition, many companies do not allow the HTTP connector for security reasons.

So in this tutorial, I will show you how to create a Child FLow that triggers from another.

1. Use Solutions

We cannot repeat it often enough, working in solutions is the best way to proceed when working with the Power Platform. This is even more true here, since the "Run Child Flow" action is only available when working in a solution. And we can only access the Flows of the same solution. It is therefore impossible to look for one outside of the current solution.

2. Child Flow: Manually triggered

The Child Flow must be of the “button” or “manually triggered” type.
For example it can be something very simple, like write a message in AppInsights or send an email.

3. Return to parent Flow

This step is really important, if you want all the process to work properly.
At the end of your child Flow, add a new step “Respond to a Power Apps or a Flow”. If you do not, your parent flow will wait and then fail. Add any type of variable and value just to end the process and return to the parent Flow.

4. Run only users (who runs the child Flow)

By default, in any Flow "manually triggered Flow, the connexion used is supposed to be the one of the person running the Flow. What changes here, it's that your Flow is not runned by a person (that can create a connection) but by another Flow. If you forget this step, you will have an error in your parent Flows.
So you need to specify which connection will be used. To do that, go into the details of you flow and on the top of the “Run only users” section, choose Edit, and replace the “Provided by run-only user” by “Use this connection”. It may require to create it. Wait until it is created.



5. Run Child Flow

Parent Flow can have any type of trigger (scheduled, manually triggered, automated ...). Just make sure it's inside the solution.
Otherwise, you will se nothing in the next step.

Once you have added all your main steps, you can then add the step for calling the Child Flow. in the actions, search for “Run a Child Flow”. In the list you should be able to find you Flow and include it as a step of your parent Flow.


Hope this helps !

#PowerAutomate #Power Automate
cookie
Cookies Consent

We use our own and third-party cookies to personalize content and to analyze web traffic.

Reject all