You can create a pipeline (nested flow) where some of the steps (inner flows) are configured to be executed conditionally.
Also, read about executing flows in a loop.
Step 1. Create a nested flow and add steps (inner flows).
Step 2. Select the flow to be executed conditionally and go to flow parameters.
value variable to
true if you want the inner flow to be executed, otherwise set it to false.
value = boolean condition; // true or false
|Object name||Class name / JavaDoc||Import|