Skip to main content

Retry

Automatically retries an operation on failure, with a configurable delay between attempts (backoff).

Parameters

ParameterTypeRequiredVariableDescription
maxAttemptsnumberNoNoMaximum number of attempts before marking the block as failed. (Default: 3, min 1, max 10)
backoffTypechoice (fixed, exponential, linear)NoNoDelay strategy between attempts: fixed, exponential (x2 on each failure), or linear (constant increments). (Default: "fixed")
initialDelayMsnumberNoNoInitial delay between attempts in milliseconds. (Default: 1000, min 100)
maxDelayMsnumberNoNoMaximum delay between attempts in milliseconds (for exponential and linear strategies).
retryOnarrayNoNoConditions that trigger a retry: error, timeout, or custom condition.
retryConditionarrayNoNoCustom condition rules to decide whether a retry should be performed.
attemptVariabletextNoNoVariable name containing the current attempt counter.

Output

Output variable : retryResult

{
"result": "...",
"attempts": 0
}

Example

Retry an API call up to 3 times.

Input :

{}

Output :

{"result": {"data": "success"}, "attempts": 2}
Tip

{{retryResult.attempts}} indicates the number of attempts made. Max 10 attempts. Delay between attempts is configurable (default 1s).