Calling Child Flows from Power Automate

The problem that any developer will encounter, regardless of the platform they are working on, is the desire to never copy or duplicate code.

It starts from a desire to keep everything clean and in its place but over time it evolves into being lazy (a good, great lazy) where you don’t want to copy things over again and again.

In a recent flow I was working on, I wanted to play around with calling Child Workflows from Power Automate (with input variables) to see if this could be done.

A few caveats to get this started;

  1. All your flows (child and parent, must be in the same solution).
  2. Your child flows “act” as HTTP endpoints to handle the input of variables.

Creating the Child Flow

For demonstration purposes, my child flow is going to create a record based on some passed-in, inputs. To start, I defined what my inputs would be and then used these as part of my Dataverse “Add Row” work.

When adding your “When an HTTP Request is received” trigger, you’ll notice a link that says “Use sample payload to generate schema”. Here you can define your variable schema and use that to generate your payload.

If you don’t do this step, your variables will not be exposed to your parent flow.

Later on in my Childflow, I used these input variables as such. Again, not generating the payload schema will also not generated the fields for your to use in your code.

Configuring the Parent Flow

Once you have created your child flow, calling the flow from the parent is relatively simple. You create a Flow as you normally would and then create an action to run a child flow. If you have added the child and parent flows to the same solution you should then be presented with your list of parameters to add to the flow.

Once this is done, you can execute the flow relatively easily to view the results.