The Repeat block

Repeat block

The Repeat block executes all the blocks that follow it for the specified number of times. The Repeat block is useful when you want to automate repetitive tasks, like processing a set of data items or performing a sequence of actions multiple times.

Inputs

Count - Specify the number of times to execute the Repeat block here. Connect this input port to any block that sends a number.

Start - This input port executes the block when it receives input. If no block is connected to this input port, the Repeat block executes when the Flow runs. For example, you could connect a Send Request block's Success output port here to synchronize the Repeat block with the request's successful response.

Output

Index - This output port sends the current run's index number. The first run's index number is 0.

Setup

Connect any block that sends a number to the Count input port. Connect the Index output port to one or more blocks you want to execute a specific number of times. Optionally, connect the Start input port to another block's output to execute the Repeat when the other block sends data.

Example

To see the Repeat block in an example Flow, check out Flow Snippets: Repeat.

Last modified: 2024/08/23