Office 365 Kick Start

Turn your Office 365 subscription from pain-point to business advantage. With our expert guidance, the path is simple.

Private Coaching

Need help getting un-stuck? Our Private Coaching will get you back on track with advice from experts in your field.

Intranet Roadmap

We'll help you plan the foundation for an employee portal that will give them access to resources they need and be in-the-know on what the organization is doing.

Cart
0
Buy a Roadmap

3 Reasons Why Child Flows are the Best Flows

Mitch Herrema

November 11, 2022

Having to build repetitive Power Automate flow logic over and over can be annoying, and a maintenance hassle. But Child Flows are here to save the day - and you some time.

Ok, What’s a Child Flow? 

You may have stumbled on the idea of a child flow in Power Automate while browsing the list of actions you can trigger. But what does that do? 

In its simplest form, it allows you to call a Flow within a Flow and return a result up to the parent flow (if you want). 

This can be a great way to slim down logic that’s happening in the parent flow, but there’s way more to it. 

Here’s a few reasons why Child Flows… are the best Flows. 

1. DRY Code 

This is a principle that’s learned in the computer science world. 

It means: Don’t Repeat Yourself 

Have you ever caught yourself building multiple flows that do very similar things? Or even times where you copy/paste steps between flows? This can… work in a pinch. 

But the principle establishes the premise that if you’re duplicating code, that code should be pulled out into functionality of its own for a few reasons: 

  • You get one source of truth for logic that SHOULD be consistent across processes in your organization 
  • Need to update the logic? Maybe change a field name? You only have to adjust it once - no tracking down the duplicates in other flows. 
  • It makes it way easier to scan/understand from the parent flow perspective. Note that this idea can also be achieved via the “Scope” block of a flow (this bundle's multiple steps together that logically make sense to group together). 
Free Guide

What does optimizing Office 365 look like?

To see what it’s like to modernize your entire organization, download our free guide.

Get the Free Guide
No items found.

2. Service Accounts 

One annoying thing about flows that are manually triggered is that it “runs-as” the user who is initiating the flow. That means they need to have ALL the licenses to perform every step of the flow, and their user account will get associated with anything that happens. 

The way around this is to either: 

We’re obviously focusing on the latter. 

Because the child flow only takes defined inputs and is triggered manually, any connections that get configured within that flow work as-is. It doesn’t have to run as the user that calls it like other flows would have to. 

Is this “the way to do it according to Microsoft”? Doubtful. 

Does it work well? Heck yeah, it does. 

Now, if you need to use a Premium Power Automate Connector in one of your flows, you can get by with a child flow and only need to pay for the extra license via the service account. This is why MS probably doesn’t like this advisement. But oh well. We’re trying to save you some money here. 

3. It’s Easy to Add Extra Logic That Would Take Forever to Duplicate 

The easiest way to illustrate this is probably with an example. 

Let’s say you have some business processes where you need to associate a “client” with an “account” when a flow gets triggered, and I need to get the ID of that client so I can associate it with the account. 

You get passed in the client’s first name, last name, email, etc. as inputs to the flow. Sometimes you get a driver’s license number if the system running the flow has it already. 

This creates precedence of operations: 

  • Do I have the driver’s license number as an input? Look up the existing client based on that number. 
  • If I don’t, let’s look them up by first name/last name/email to see if I have them in the system already. 
  • I didn’t find them… how about we just create a new client and pass back the ID that gets created. 

This creates quite a few branches that would be a pain to copy and maintain. If this was as simple as “I always get their driver’s license number, just grab an existing client with that number”, yeah, that can be built on the spot pretty easily. 

But we want some redundancy and extra checks here. I want my system to be smart enough to take whatever inputs I give it, and spit out an ID. I don’t want to even really consider the logic that’s going on behind the scenes when I’m building the parent flow. 

And because I have it separated into a child flow, it’s much easier to view it as a “utility” that can be used to make things nice and simple from the 10,000-foot view. 

And the beauty of this benefit along with the first DRY Code benefit, is if new use cases come down the line (maybe we start keeping track of addresses or something and want to look up based on address), there is only one place to adjust the fairly complex logic, and all the parent flows “see” is one extra optional parameter. 

A Few Gotchas 

Are you sold yet? I hope so… that’s kind of the point of this blog 😬 

Well, don’t go running off quite yet, there are a few other things you should know. 

  • ONLY use child flows in a solution. It’s possible to use the HTTP Connector directly outside a solution, but that raises security concerns. If you want to learn more about environments/solutions, check out our blogs on Environments and Application Lifecycle Management
  • Child flows depend on the HTTP Connector. If your administrator has disabled HTTP Connectors, you won't be able to use them. Ping your Microsoft rep and point them to this information 
  • You have to create the parent flow and the child flow directly in the same solution. You can't just import them in. 
  • Passing in variables can be annoying if you have a bunch of data to send. Using a JSON string can help. 

Wrap Up 

Hopefully, this does a good job illustrating why you should try using child flows at your organization. They’ve been super useful to us for all the reasons above and have slightly reduced the headaches involved with Power Automate 😉. 

Anyway, there’s so much more to this topic that we could dig into. If you want to know more, leave us a question/comment below! 

Whenever you're ready, there are 4 ways we can help you:

  1. Turn your Office 365 subscription from pain-point to business advantage here.
  2. Automate and improve a top-priority business process here.
  3. Build a better intranet for your employees here.
  4. Turn your O365 administration into a subscription with OfficeBoost.

Have Questions About This?

Leave a comment below!

Bring them to our next Online Office Hours

No items found.
Thanks!
Was this helpful?
No items found.