Pipelines can include conditional statements, including multiple branches of if-then-else statements, iterations on query and search steps, and stop blocks based on conditions.
You can also expand your conditions using jinja code for less than, equals, etc. Learn more about jinja.
Field types
For more information about conditions and field types, see field types and do query.
If-then-else statements
An if-then-else statement evaluates to either true or false. You can choose to have specific steps in your pipeline run either when the condition is true or when it is false.
Steps you add to the Then branch run if the condition is met. Steps added to the Else branch run if the condition is not met. In other words: If true, then perform this step, else perform this step. The else statement does not need to be filled in; if you leave it blank, the pipeline stops if the condition is not met.
You can add as many steps as you want to your condition and also add additional conditions or stops.
Use the Condition step to add conditional logic to your pipeline.
A condition step has two branches:
- If condition is met—defines what happens IF the condition true.
- If condition is not met—defines what happens if the condition is not true. This is also called the ELSE branch. When this branch is empty, the pipeline stops if the condition is false.
Adding iterations to search steps
A search or query step results in a list of records that matches your criteria. When you add a Search step, we automatically add a loop step for you. For example, you could send a Slack message for each record in your Tasks table that is more than 5 days overdue.
That would have a Search Records step, a Loop step, and then a Send a message to Slack step in the loop.
Stop a pipeline
To stop a pipeline from running when a specific condition is met, use a Stop step. This can make it easier to manage exactly what happens when a pipeline runs.
Your pipeline stops running when it reaches this step.
Stop steps cannot be used in a loop.