The For block is a control block used to repeatedly run a series of blocks in your flow. It accepts an array as input. Then the For block sends each item in the array from its output port, one item at a time. You can use a Collect block to gather the individual items sent from the For block and place them back into their original array order.
List - Accepts an array of values like [1,2,3]
or ["one","two","three"]
. The For block requires an array to be sent this input in order to run.
Start - This input port triggers the block when it receives input. If no block is connected to this input port, the For block triggers when the flow runs. For example, you could connect a Send Request block's Success output port here to synchronize the For block with the request's successful response.
Item - Sends each item in the list sequentially, one at a time.
To set up the For block, connect the List input port to another block's output port that sends an array. Blocks that can send an array include the following:
Optionally, you can connect the Start input port to another block's output port to trigger the For block's execution.
To see the For block in an example flow, check out Flow Snippets: For.
Last modified: 2024/08/23