Depending on data received in previous steps of your workflow, you may want to decide how to proceed further. Two actions help you split your workflow based on conditions:

  • Condition splits the workflow into exactly two branches.
  • Split splits the workflow into multiple branches.

You can add either of these just like you add any other action, using the + button in the workflow editor:

Condition

The Condition action splits the workflow into exactly two branches. One is executed if one or multiple conditions that you specify are satisfied, and the other is executed otherwise.

Think of this as the equivalent of an if statement in programming.

If you choose the Condition action, the properties pane on the right lets you define the condition. By default, there’s only one condition, but you can combine multiple conditions with logical conjunction (click And) or disjunction (click Or).

Every condition contains one or two data fields. Clicking a data field opens the Data Selector view, allowing you to select output from any of your prior actions:

Alongside the data fields, there’s a combo box that defines the specific operation for your condition. See Operators for details.

Here’s an example of a complete condition that takes a list from a previous action and checks if the list contains any actions — in other words, if its length is more than zero:

As shown in the screenshot above, you can test your condition in the Generate Sample Data pane and verify if the result is as expected.

Split

The Split action splits the workflow into multiple branches. Each branch executes if its specific condition is met. An extra branch, called the default branch, executes if none of the conditions specified for other branches is satisfied. Every condition should be unique: if conditions in multiple branches are satisfied, this results in a workflow failure.

Think of this action as the equivalent of a switch statement in programming.

Each condition in the Split properties pane has one or more data fields and a combo box to define the operator.

Unlike the Condition action, Split only allows one condition per branch, meaning you can’t define complex conditions using And or Or operators.

Operators

When you define conditions using the Condition or Split actions, you need to specify what operation to apply to the value(s) you supply. The combo box alongside the data fields lets you do just that:

OpenOps provides 20+ operators applicable to several types of data: text (strings), numbers, boolean values, lists, and dates.

Here’s the complete list of operators along with their additional settings:

Data typeOperator
TextContains
TextDoes not contain
TextExactly matches
TextDoes not exactly match
TextStarts with
TextDoes not start with
TextEnds with
TextDoes not end with
NumberIs greater than
NumberIs less than
NumberIs equal to
BooleanIs true
BooleanIs false
All data typesExists
All data typesDoes not exist
ListIs empty
ListIs not empty
ListLength is greater than
ListLength is less than
ListLength is equal to
ListContains
ListNot contains
DateIs before
DateIs after

All text operators provide a setting to toggle case sensitivity. All other operators come without additional settings.

Exploring conditional branches in large workflows

If you’re dealing with a large workflow with many conditional branches and are having trouble navigating between them, click Tree view in the top control pane of the workflow editor:

This displays the Tree view pane on the left of the editor — a great way to see a compact representation of your workflow, including conditions and branches: