The concept of subflow should be easy to understand – when you want to launch a flow inside another flow (main flow), it is a Subflow. However, the timing to use a Subflow is a more difficult question. There might be many possibilities, but the most common case is when you have many flows and in each of them there is the same set of actions, you can make that set of actions into a Subflow so you do not need to create those actions again and again.
Note that Subflow element is only available in a Screen flow or a Scheduled-Triggered flow. Let’s go through the steps of setting up Subflow. (Want to learn more about different flow types? Check here)
1. Choose The flow To Launch As Subflow
The referenced flow must be activated before you can find it here, so make sure you make the subflow first and the main flow afterwards.
2. Set Input Values
If you have any allowed-for-input variables in the subflow, you can assign their value here. (What is allowed-for-input variables? Check here)
3. Manually Assign Output Variables (If Needed)
By checking “Manually assign variables”, you can save the output variables of the subflow (if there is any) at the chosen variables. Otherwise you can find the output variables as “Outputs from [API name of the Subflow]“.
|Use Case Of Manually Assigning||Explanation|
|You want the variable to have a neat name to reference it later.||As the name of the auto-generated variable is very length, you can use this option to make the variable more readable.|
|You want to save the value in an output-allowed variable.||The auto-created variable is not allowed for output. If you want to use this functionality, create a output-allowed variable and assign it manually.|
Review again on input/output-allowed variable!