Skip to main content

Set trigger conditions

BindTuning Team avatar
Written by BindTuning Team
Updated over 2 months ago

Setting trigger conditions is a key step in the automation creation process. For a complete overview of all the steps, refer to What's in an automation?.

Trigger conditions are your way of telling an automation exactly when to run.
By setting precise criteria, you ensure your workflows only run when they're truly needed, giving you granular control over every automation and keeping your processes efficient.


Components of a trigger condition

Each trigger condition is built from three essential components: a field, an operator, and a value.

  • Field: This is the column from your data source that you want to check (e.g., 'Status', 'Project Type').

  • Operator: This defines the relationship between the field and the value. The available operators change depending on the field type. For instance, a text field might offer "is equal to" or "contains," while a number field would provide "is greater than" or "is less than."

  • Value: This is the specific data you are comparing against. For a condition like "Status is equal to 'Approved'," "Approved" is the value.

For a full list of supported field types, organized by the type of system you are connected to, please refer to our article on Supported field types for trigger conditions.


Logical operators

Logical expressions are the foundation of your automation conditions, allowing you to define the exact criteria that must be met for a workflow to run. By combining a set of rules with simple operators, you can build a precise condition that an incoming request or data entry must satisfy.

The "And" operator

When you use AND to combine conditions, the automation will only run if all of the conditions are true.

  • Example: If you set two conditions—'Status' is equal to "Approved" AND 'Requested By' is equal to "John Doe"—the automation will only run if a record meets both criteria.

The "Or" operator

When you use OR to combine conditions, the automation will run if at least one of the conditions is true.

  • Example: If you set two conditions—'Status' is equal to "Approved" OR 'Status' is equal to "Completed"—the automation will run for any record that is either "Approved" or "Completed."


The Expression Builder

The automation wizard interface includes an Expression Builder to assist you when creating simple logical expressions for your trigger conditions.

You can use as many AND and OR operators as you need to build your conditions. However, when you combine them, the wizard follows precedence rules, just like in a math problem where multiplication and division are performed before addition and subtraction.

The rule is simple: the And operator is always evaluated before the Or operator.

Let's look at the example in the screenshot above. The expression:

Priority -eq 'Critical' -and Progress -eq 'Not started' -or Progress -eq 'Behind'

is interpreted using these precedence rules. It is evaluated as if it were written like this:

(Priority -eq 'Critical' -and Progress -eq 'Not started') or (Progress -eq 'Behind')

In plain English, this means the automation will run if:

  • The item's Priority is 'Critical' AND its Progress is 'Not started'

OR

  • The item's Progress is 'Behind' (regardless of its priority).

The Builder applies standard precedence rules: When combining And and Or operators, remember that the And operator is always evaluated first.


Building complex expressions

While the basic And and Or options are effective for simple conditions, you can build much more complex expressions using the dedicated Expression Editor. This editor provides full flexibility to design sophisticated logic for your automations.

Caution: In the expression editor, we do not perform validations on the syntax. You are free to add additional operators or group them, but please ensure your expression is correctly formatted to avoid automation failures.

In the editor, you can use parentheses () to override the default precedence rules and control the order of evaluation.

For instance, you might want to create an expression where the Priority must be Critical, and the Progress must be either 'Not started' or 'Behind'.

To achieve this, you would group the or conditions with parentheses like this:

Priority -eq 'Critical' -and (Progress -eq 'Not started' -or Progress -eq 'Behind')

In this case, the expression first evaluates the conditions inside the parentheses, meaning the automation will run if:

  • The item's Priority is 'Critical'

AND

  • The item's Progress is 'Not started' OR 'Behind'.


Updating trigger conditions

Once your automation is saved and published, you can easily go back and make changes. This flexibility allows you to adapt to changing business needs and keep your workflows accurate. As an admin, you can edit the automation at any time to adjust its trigger conditions or any other settings.

Did this answer your question?