Adding conditions

Your pipeline 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. See About jinja for more information.

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 will run if the condition is met. Steps added to the Else branch will 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 will stop 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.

To add conditional logic to your pipeline:

  1. Select Insert a condition.

  2. Add your condition to the IF statement. For example, title of the record is created in your Companies table starts with North.

  3. In the THEN branch, specify what will happen if this condition is true. In this example, post a message to the team’s Slack channel.
    then condition to send a slack message

  4. If needed, specify what will happen in the ELSE branch if this condition is not met. If you leave the ELSE branch empty, the pipeline will stop 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. You can add a for-each set of steps to iterate, or loop, over the list of items. For example, you could send a slack message for each record in your Tasks table that is more than 5 days overdue.

You can add as many iterations as you need and also have nested loops.

  1. Add a Search pipe. In this example, Search records in your Quickbase Tasks table.

  2. Specify when you want your For-Each loop to run, such as when a record is found where the number of days overdue is greater than 5.

  3. Add a step under Do that will happen for each record that meets the criteria, such as send a Slack message.

  4. If applicable, specify the search criteria and how to order the results. In certain channels, you can add specific search criteria using that channel’s syntax and specify the display order for the results.

Stopping the pipeline

To simplify your pipeline and make it easier to manage, you can add a stop block. This stop block will stop the pipeline from running when a specific condition is met. Your pipeline will only stop if the condition is met.

To add a stop to your pipeline:

  1. Hover over the empty step box to expand.
  2. Select the Stop icon.

Your pipeline will stop running once it reaches this Stop block.

Note: Stop steps cannot be used within a loop.