Using subflows
When a flow contains a large number of actions, it may be split up into subflows, making it more manageable and easier to maintain. Subflows can be used to organize a flow's actions, but they also allow the reuse of parts of the flow, which helps to avoid cluttering by copy-pasted actions.
Finished flows may contain tens, hundreds, or even thousands of actions:
Let’s improve this flow's readability without changing its functionality, using subflows to break it up into self-contained parts. This can be done through the subflows list on the top-left:
The Main subflow is always present, since it signifies the start of the flow; we will add more subflows by pressing the New subflow button:
An empty subflow is created and named. We will proceed to add a few subflows which correspond to discrete parts of the flow:
New subflows are visible as tabs at the top of the workspace:
Now, we can proceed to move actions from the Main subflow into these new ones:
Finally, to run the subflows, we must make use of the Run subflow action: