Make your Power Automate Desktop flows cleaner with subflows
Subflows in Power Automate Desktop are a way to isolate some actions out of the Main flow. This has many benefits:
- Main flow is cleaner
- Repetitive actions can have their own flow
- Can be used as “branching” (more on that later)
Where can I create subflows?
When you open the Power Automate Desktop designer, you’re landing straight into the Main flow tab. If you look on the left of that tab, you’ll see “Subflows” as a dropdown menu.
By expanding the menu, you’ll see your Main flow listed, with a “+ New Subflow” button. This is where sublflows are created.
Subflows to isolate actions
As your entire flow is getting more and more complex, you’d want to isolate some actions to make your Main flow cleaner.
So you’ve got this little “piece of actions” that will be triggered from the main flow whenever you decide to. You can then add this subflow multiple times within the main flow without repeating all the steps manually, which would make the main flow cluncky and difficult to read!
To insert and run a subflow, navigate to the left panel, and under Flow Control –> Run subflow. Just drag this action to the main flow area, and add the subflow you created.
Subflows as branching
You could also use subflows as if you needed to perform other actions if something was happening.
For example, if you encounter an error. Then the subflow will trigger and finish whatever needs to be done like you were on the main flow. This allows for not “going back” to the main flow, and potentially create more issues (i.e.: not coming back to the correct step on the main flow).
To add a subflow for an “OnError” action:
- Double click your action –> Click on the “OnError” button (bottom left of the popup)
- Click on “New Rule” –> Run subflow
- Select your subflow in the dropdown
Details of the subflow used for branching that will not “go back” to the main flow
I made a video about styling your cells using Power Automate Desktop, and I create a couple of subflows that I’m using as branching. Meaning we have a Main flow, and as soon as I encounter an error, I’m running a subflow to help with the issue.
🎥 You can watch it here: Power Automate Desktop - 3 different scenarios to style your cells with ERROR HANDLING & SUBFLOWS!
Thanks for reading! 🙂