Run Flows For List Step
  • 24 Feb 2021
  • 2 Minutes To Read
  • Print
  • Share
  • Dark

Run Flows For List Step

  • Print
  • Share
  • Dark


This tutorial demonstrates how to use the Run Flows For List step. This step works similarly to the For Each step. The main difference is the 'Run Flows For List' able to run a separate Flow for every item in the list. Since an individual Flow is being run for each list item, a user can further configure the child Flows behavior to either run Synchronous, Thread Job, Thread Job Async, Work Queue, Async and Wait. 

Setting NameFunction
SynchronousRuns in real-time on the current Flow or thread. Similar to how in-session forms display to the current user immediately.
ThreadJobRuns in a synchronous fashion, but uses multiple threads on the machine to execute faster.
WorkQueueRuns Flows across multiple queues, splitting the load.
ThreadJobAsyncRuns the Flow Async and doesn't wait for any return data.
 AsyncAndWaitRuns the processes and pauses the parent Flow until the step has finished executing all of the items in a list.


In this example use the Run Flow For List step to run a Flow for each account in a list. The completed Flow will look like the image below.

Begin in a Designer Folder and Create Flow on the Folder Actions Panel. In the Create Flow dialog name the Flow and select Create to proceed to the Flow Designer.
In the Flow Designer add a Get All step from All Integrations > Internal Services > Account Service.

Add a Run Flow For List step from the Data > List category. Configure the Run Flow For List step.
In the Data section of step configurations under Input Type picker select Account as the type. Using the Output Type picker choose String type. The type that will be output will be the Email Address from the Account type. In the Flow section of the step configuration, there is an option to build an Item WorkFlow and choose a Run Behavior. This example use Synchronous. Then, check the Expose All Flow Data checkbox to be able to use all our Flow Data in the Run Flow For List.

Next, set the 'Input List' variable to 'Select From Flow', and map in GetAll1_Output.

Finally, select the Edit icon for the Item WorkFlow to build the Item WorkFlow.

In the Flow Designer for this example, simply connect the Start Step to the End Step. With the End Step selected navigate to Input and choose Input.EmailAddress for the Output Data. Save and close.

In the main Flow Designer, connect the outcome from the Run Flow For List step to the End step in the Flow.
On the top action panel of the Flow Designer select 'Debug'.
The Flow executes in the Debugger with no errors. Input Data for the Run Flow For List step indicates that the step accepted a List of Accounts.
The Outcome data for this step is a list of Email Addresses from the input collection Accounts.

Was This Article Helpful?