Skip to main content

The Loop block

Loop logic within a workflow.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

data

The data.

Type array
Format Custom data
Configurability Read-only
Defaultnull
Examples
{"key": "value"}

error

The error message if the action was unsuccessful.

Type string
Format Plain Text
Configurability Read-only
Defaultnull
Examples
"Error: Something went wrong"

metadata

Relevant metadata for the item.

Type array
Array values object
Configurability Read-only
Defaultnull

Settings

You can configure the following settings for Loop blocks.

Timeout after (ms)

The duration to wait before the block times out. Default is 10000.

Retry count

The maximum number of attempts to retry the query if an error is returned.

Interval

The minimum length of time to wait between query retries. This is useful if a query is triggering a rate limit.

Exponential

Whether to increase the interval between retries, also known as exponential backoff. This is useful for handling rate limits.

Coefficient

When exponential backoff is enabled, the constant factor by which the time delay between retry attempts increases after each failure.

Max interval

When exponential backoff is enabled, the maximum time to delay between retries.

Finally

Whether to stop the workflow and return an error if the block fails, or continue to allow an error handler to run.