While
Written by
Updated at April 24, 2025
Performs the sequence of steps specified in do
as long as the condition
is met and the number of iterations does not exceed max_iterations
. The result is the output data of the last iteration's last step for which you can set the output
field value.
Each execution branch within the while
step (including all Switch steps) must contain an integration step or a Success, Fail, or Wait step.
Field name | Type | Required | Default value | Templating is supported | Description |
---|---|---|---|---|---|
input |
string |
No | Overall state of the workflow | Yes. The $counter variable is additionally available, which is equal to the iteration number (indexing starts from zero). |
A jq expression to filter the workflow state fed into the step. |
output |
string |
No | Step output data | Yes | A jq expression to filter the step outputs added into the workflow state. |
do |
WhileDo | Yes | No | No | Sequence of steps to apply to each input data item. |
condition |
string |
Required unless max_iterations is specified |
No | Yes. The $counter variable is additionally available, which is equal to the iteration number (indexing starts from zero). |
A condition in jq format that returns either the true or the false string. |
max_iterations |
int |
Required unless condition is specified |
No | Yes | The maximum number of iterations the cycle can complete. |
next |
string |
No | No | No | ID of the next step. |
WhileDo object
Field name | Type | Required | Description |
---|---|---|---|
start |
string |
Yes | ID of the step to start the execution from. |
steps |
map<string, Step> |
Yes | Description of the steps. Object where key is the step ID, and value is the object describing the step parameters. The structure is similar to the steps field in the high-level specification. |