If statements

An If Action directs a Workflow to run an action or set of actions if a specified condition is true.

The If action uses the following condition builder:

You can use this builder to create the conditions you want to evaluate. If the condition is true the Action specified in the If statement will be executed.

If else

If you want to execute one set of actions if a condition is true and another if the condition is false , use an `If else Action.

Check If Condition

This Action button allows you to verify if a specific condition is either true or false without running the nested actions.

Loop

The loop action enables you to run a Step or multiple Steps for each element in a list.

Referencing an item in a loop

In a loop action above, we use the {{steps.S1.item}} expression or the variable picker in order to reference the current item being iterated. To find the item reference in the variable picker, choose the specific loop step (in the case above - S1), and then then item value. During execution, the specified set of steps in the loop will be executed once for each item in the list.

Debugging a loop

In the loop action there are three debugging actions you can use to debug a loop: Run All, Run Next Item and Reset.

The index in a list always starts from 0.

Run All

  1. The Run All action runs through the entire list once.

Run Next Item

  1. The Run Next Item action runs the next item in the list when iterating through the list.

Reset

  1. The Rest Action resets all the changes made when applying any settings to the loop.

Advanced Settings

  1. Start from Index allows you to start your loop at a specified index in your input list. For Example:

  1. Stop at Index allows you to end your loop at a specified index in your input list. For Example:

Tooltip

In the following examples, when you enter the advanced settings and hover over the Run All action, a tooltip will appear explaining the starting index and the index the iteration will stop at. Similarly, when you hover over the Run Next Index action, a tooltip will appear explaining the index that will run next.

Please note when using the Run All or the Run Next Item action and an advanced setting has been applied, it will continue iterating through the list based on the previous list index displayed in the output.

For example, if you start the loop iteration in the middle of a list and then choose the Run All action, it won’t restart the loop from the beginning of the list. Instead, it will resume the loop from where you left off.

The Start from Index and the Stop at Index advanced settings are applied in both edit mode as well as run time.

Keywords

  1. index - refers to the to the specified starting index.
  2. item - refers to the to the specified stopping index.
  3. total_items- refers to the total number of items in the list.

While Loop

The While Action enables you to run a Step or multiple Steps for as long as specified conditions are met.

The Do-While Loop

The While Loop Action has an advanced option that allows you to execute your loop as a Do-while loop instead of a While Loop. A Do-while loop ensures a step or multiple steps are executed at least once. After the initial execution, it repeatedly runs the subsequent steps of code for as long as the specified conditions are met.

The Advanced option also allows you to enter the maximum amount of iterations you would like your While Loop or Do-while loop to carry out.

Set variables

The set variables Action enables users to define variables and use them in the execution of the Workflow. These variables are not exposed as parameters of the Workflow. Refer to input parameters to define input for a Workflow.

Defining and using variables:

  1. Add the Set Variable action to the Workflow Editor to create a set variables Step.
  2. Select a variable type (boolean, numeric, string, or list.)
  3. Enter a name for the variable.
  4. Set the value for the variable. If not set, the default values are as follows:
Variable TypeDefault value
Booleanfalse
Numeric0
String[]
List""

Note: Lists can be comma-separated or in JSON list format.

  1. Click the ‘Add Variable’ button to add more variables
  2. Use the variables in a different Step using expression language. For example: {{variables.my_variable}}.

Switch Case

The Switch Case action allows you to compare a given value with a series of possible values and execute different blocks of actions based on the matching case value.

Flow Control Action NameIcon
Switch caseThe Switch Case includes a Switch Variable which is compared to a list of case values. If any of these case values matches the Switch Variable, it prompts the execution of a particular block of actions associated with that matching case value.
CaseEach Case is a value that is compared against the Switch Variable if the value of the Switch Variable matches a Case value, the corresponding block of actions associated with that will be executed
ActionsWithin each case, you can choose any set of Actions to be performed.
Case DefaultThe default case serves as a default output option and comes into play when the Switch Variabledoes not match any of the other Case values.

Switch Case Example

In the above Workflow example, the appropriate Case Action will be executed based on the matching values between the Case value and the Switch Variable value.

Run - On Error

The Run - On Error flow control is used to handle errors that might occur during the execution of a workflow.

The Run - On Error flow control utilizes a dual-step structure, consisting of Run and On Error, designed to efficiently manage any errors that might arise while executing actions within the Run phase.

Run: This step is designed for placing action(s) that contributes the overall Workflow sequence.

On Error: If there is an error during Run block, the flow will automatically shift to the On Error block. In this block, specific actions are taken to address the error. The error JSON object will be made available within the On Error block to assist in handling the error.

If an error occurs in the Run block but is successfully handled in the On-Error block, the workflow will continue to run after the executing the On-Error block. However, if errors occur in both the Run’ and On-Error blocks, then the workflow will fail.

Wait

Variable typeDefault value
Wait For1.Workflow Execution, 2. Workflow Execution, 3.Web Form Response
TimeoutThe time value
Time UnitSeconds, Minute, or Hours.

Wait for: Time Interval

This is the default mode for the Wait Action. It directs the Workflow to wait a specified amount of time until it continues running. When creating the Step, specify the number of seconds, minutes or hours to wait to wait.

The “Wait” action will have a maximum timeout of 14 days. For more information please visit the Workflows Runtime Limitations section of our documentation.

Wait for: Workflow Execution

This mode enables you to wait for steps in your Workflow that execute other Workflow asynchronously. The step is paused until all the executions it is waiting for, have finished running. The output of the Wait Action will return details of the executions it is waiting for.

Wait For: Web Form Response

The mode is used with the New Web Form Action to pause the workflow until a response from a user is submitted through the web form. This ensures the workflow proceeds only after the necessary input is received.

Note

The Note action provides a rich text editor that allows you to add helpful instructions, explanations, or contextual guidance for end-users within a Workflow. The text editor supports Markdown (md) syntax. This action is useful for adding clarity to complex workflows, ensuring users understand the next steps or any important details.

End Run

The End Run action enables you to select the final status of an execution, Completed or Failed.