Loops for Flows

Prev Next

Loops for Flows allows you to iterate over a collection of items, numbers, or text. This enables you to perform actions multiple times within a workflow based on dynamic data, making it ideal for scenarios like processing a list of items, performing operations on a series of numbers, or handling chunks of text.

Configuring the Loops for Flows Action

In your Workflow select the Built-in tool "Loops" as an action.

Choose the Event: Select one of the following loop types based on your needs:

Loop Items: Iterate over a list or array of items.

Loop Numbers: Perform a set number of iterations, looping through a defined range of numbers.

Loop Over Text: Loop over a block of text, processing it one character or word at a time.

Loop Over CSV: Iterate over the rows of a CSV file, running the workflow once per row. Each column in the row is exposed as a separate field inside the loop, so you can reference individual column values in the steps nested within the loop.

Define Loop Parameters

Loop Items: Select the array or list that holds the items to be looped over. You can choose an array from previous steps. Then, define the item index (starts at zero) and maximum iterations (you can maximum loop over 500 items).

Loop Numbers: Define the item index (starts at zero) and maximum iterations (you can maximum loop over 500 items).

Loop Over Text: Define the text string that you want to loop through and the text delimiter to split the text into words. Define the item index (starts at zero) and maximum iterations (you can maximum loop over 500 items).

Loop Over CSV:

  • File (required): Select the CSV file to loop over. This is typically a file reference coming from a previous step.

  • Header row: Tells the action where the column names come from. Two options are available:

First row from the CSV file (default): the first line of the file already contains the column names.

No header row in CSV file — I'll provide them below: the file has no header line, and you define the column names yourself in the Column names field.

  • Column names: Only used when Header row is set to "No header row in CSV file". Provide the column names separated by the Column separator, for example fieldName1,fieldName2. These names become the fields available in each iteration of the loop.

  • Column separator: The character that separates the values within each row. Defaults to Comma. Available choices are Comma, Semicolon, Pipe, Space, and Tab.

  • Rows to process at once: How many rows are processed at the same time. Set it to 1 to process rows one after another, in order — best when each row depends on the previous result or when order matters. Use a higher number to process rows in parallel, which is faster for large files. The default is 1 and the recommended maximum is 50.

Accessing row data

Inside the loop, each row is available as item and every column becomes a field on it (e.g. item.ColA). When Header row is "First row from the CSV file", the column names are taken from the first line; otherwise they come from the Column names you provide. Each row also carries its 0-based index reflecting its position in the file.