IF conditions allow you to add more logic to your recipe flow. Escalate urgent support tickets by checking the priority with an IF condition or use the IF condition to check for a valid email before sending an onboarding greeting.
IF conditions can be found in multiple features:
Trigger Conditions
You can set IF conditions for your triggers to define what subset of trigger events should be processed by the recipe, for example, only new Salesforce accounts with the type "Customer", or only Salesforce leads with the rating "Hot".
The Salesforce trigger has the trigger condition set to only process new/updated cases with the status of "Closed”
Conditional action step.
You can set IF conditions within your recipes to better define the workflow processing logic, for example, update the Zendesk organization if found, otherwise create new Zendesk organization.
Recipe that uses conditional steps to decide whether to create or update Zendesk organization.
Auto-retry feature in error monitor step
You can set IF conditions to determine when to carry out auto-retries, for example, only auto-retry the steps in the Monitor block again if the error thrown is a timeout or a temporary network issue.
Configuring the retry condition field. In this example, the actions in the Monitor block will only be carried out again if the error message does not contain the 401 error code.
Conditions
Each condition consists of 3 parts - data, condition, and value. Conventionally, the data (left-hand-side) is the variable data from your app, for example, case status, or lead rating. Accordingly, the value (right-hand-side) is the static value you wish to check against, for example, "Closed" or "Hot", correspondingly. Data and values are case sensitive.
In this article, we go through the 14 conditions you can choose from. We will be using trigger conditions as examples. Additionally, you can combine multiple conditions with the AND or OR operators to set up complex conditions.
Each condition will be valid for different data types. If a condition is attempted to be used for invalid data types, it might prevent the recipe from starting successfully.
If an invalid IF condition was set up for triggers, the recipe might:
- throw a trigger error after the recipe has started, resulting in the inability to pick up trigger events, or
- result in the recipe filtering out all trigger events.
contains
This condition checks if the data contains the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
The trigger condition tells the recipe to only process new Zendesk tickets with a subject that contains the word "bug"
Valid types
This condition is only valid for array and string data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"UI bug" |
| Yes |
"UI BUG" |
| No |
"Instructions unclear" |
| No |
"" |
| No |
|
| No |
12345 |
| No |
[1, 2, 3] |
| Yes |
[1, 2, 3] |
| No |
["abc", "pqr", "xyz"] |
| Yes |
["abc", "pqr", "xyz"] |
| No |
starts with
This condition checks if the trigger data string begins with the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity.
The trigger condition tells the recipe to only process new Zendesk users with phone numbers beginning with the string “(408)” or “(669)”
The Starts with condition searches only for exact matches, and null values will not be picked up.
Valid types
This condition is only valid for string data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"(408) 555-6928" |
| Yes |
"408 555-6928" |
| No |
"(650) 555-2395" |
| No |
"" |
| No |
|
| No |
12345 |
| Trigger error thrown |
numeric_type_pill |
| Trigger error thrown |
numeric_type_pill |
| Yes #if pill = 12345 |
Special non-string data type cases
When we try to compare non-string data types with a starts with
condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for starts with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, Workato converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Non-string datapills will be converted to a string for comparison if value is a string
ends with
This condition checks if the trigger data ends with the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
If the field you specify in your condition is left blank in the application you’re using, no event will be picked up.
Valid types
This condition is only valid for string data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"(408) 555-6928" |
| Yes |
"408 555-6928" |
| No |
"(650) 555-2395" |
| No |
"" |
| No |
|
| No |
12345 |
| Trigger error thrown |
numeric_type_pill |
| Trigger error thrown |
numeric_type_pill |
| Yes #if pill = 12345 |
numeric_type_pill |
| No #if pill = 123 |
Special non-string data type cases
When we try to compare non-string data types with a ends with
condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for ends with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, the datapill's value is converted into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Non-string datapills will be converted to a string for comparison if value is a string
does not contain
This condition is the opposite of the contains condition. It checks if the trigger data DOES NOT contain the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity.
If the field you specify is left blank in the application you are using, the Doesn’t contain condition will not count it, and no event will be picked up. This can be circumvented by using the Is true or Is not true conditions with a string formula, as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for array and string data types.
Examples
Trigger Data | Condition / Value | Picked up by recipe? |
"UI bug" | doesn't contain "bug" | No |
"UI BUG" | doesn't contain "bug" | Yes |
"Instructions unclear" | doesn't contain "bug" | Yes |
"" | doesn't contain "bug" | Yes |
nil | doesn't contain "bug" | No |
12345 | doesn't contain 123 | No |
[1, 2, 3] | doesn't contain 1 | No |
[1, 2, 3] | doesn't contain [1, 3] | Yes |
["abc", "pqr", "xyz"] | doesn't contain "abc" | No |
["abc", "pqr", "xyz"] | doesn't contain ["abc", "pqr"] | Yes |
does not start with
This condition is the opposite of the starts with condition. It checks if the trigger data string DOES NOT begin with the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity.
The trigger condition tells the recipe to only process new/updated Quick Base opportunity records if the Opportunity field doesn’t start with the string “B”
If the field you specify is left blank in the application you are using, the Doesn’t start with condition will not count it, and no event will be picked up. As with the Doesn’t contain trigger condition, this can be circumvented by using a string formula with the Is true formula as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for string data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"(408) 555-6928" |
| No |
"408 555-6928" |
| Yes |
"(650) 555-2395" |
| Yes |
"" |
| Yes |
|
| No |
12345 |
| Trigger error thrown |
numeric_type_pill |
| Trigger error thrown |
numeric_type_pill |
| No #if pill = 12345 |
numeric_type_pill |
| Yes #if pill = 345 |
Special cases
Non-string data types
When we try to compare non-string data types with a doesn't start with
condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for doesn't start with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, Workato converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Non-string datapills will be converted to a string for comparison if value is a string
Nil/null
When the trigger data is nil (also known as null), the trigger event will not be picked up by the recipe, even if it seems like it matches the condition, for example, nil
doesn't end with "345".
does not end with
This condition is the opposite of the ends with condition. It checks if the trigger data DOES NOT end with the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
The trigger condition tells the recipe to only process new/updated Dynamics CRM customers if their Full Name doesn’t end with the string “Skywalker”
If the field you specify is left blank in the application you are using, the Doesn’t end with condition will not count it, and no event will be picked up. Similar to the Doesn’t contain trigger condition, this can be circumvented by using a string formula with the Is true formula as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for string data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"(408) 555-6928" |
| No |
"408 555-6928" |
| Yes |
"(650) 555-2395" |
| Yes |
"" |
| Yes |
|
| No |
12345 |
| Trigger error thrown |
numeric_type_pill |
| Trigger error thrown |
numeric_type_pill |
| No #if pill =12345 |
numeric_type_pill |
| Yes #if pill =123 |
Special cases
Non-string data types
When we try to compare non-string data types with a doesn't end with
condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for doesn't end with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, Workato converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Non-string datapills will be converted to a string for comparison if value is a string
Nil/null
When the trigger data is nil (also known as null), the trigger event will not be picked up by the recipe, even if it seems like it matches the condition, for example, nil
doesn't end with "345".
equals
This condition checks if the trigger data equals the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
The trigger condition tells the recipe to only process new/updated Salesforce cases with the case-sensitive status of “Closed”
Valid types
This condition is valid for all data types, for example, integers, and floats, dates, arrays.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"Closed" |
| Yes |
"Closed" |
| No |
"" |
| No |
"" |
| No |
'null' |
| Yes |
|
| No |
12345 |
| Yes |
12345 |
| Yes |
6 - 1 |
| Yes |
"Closed".present? |
| Yes |
"Closed".present? |
| No |
"Closed".present? |
| No |
Special string conversion cases
When we try to compare a non-string data type trigger data to a string data type value, Workato will convert the trigger data into string for comparison, for example, 12345 equals "12345" will evaluate to true.
does not equal
This condition is the opposite of the equal condition. It checks if the trigger data DOES NOT equal the value. It is case-sensitive - make sure to lowercase or capitalize both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
The trigger condition tells the recipe to only process new Zendesk tickets with a priority not equal to the case-sensitive string “Low”
Valid types
This condition is valid for all data types, for example, integers, and floats, dates, arrays.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"Closed" |
| No |
"Closed" |
| Yes |
"" |
| Yes |
"" |
| Yes |
'null' |
| No |
|
| Yes |
12345 |
| No |
12345 |
| No |
6 - 1 |
| No |
"Closed".present? |
| No |
"Closed".present? |
| Yes |
"Closed".present? |
| Yes |
greater than
This condition checks if the trigger data is greater than the value.
The trigger condition tells the recipe to only process new Salesforce accounts if their SLA expiration date is greater than the date of “12/21/2018”.
If value is set to a number, and the trigger data field has a null value, the recipe will raise a trigger error, as computationally, a number cannot be compared with a null value. To resolve this issue, add an is present condition along with the greater than condition.
The trigger condition tells the recipe to only process new Salesforce opportunities with an existing SLA expiration field (i.e. is present) and is set to expire after 12/21/2018 (i.e. greater than)
Valid types
This condition is valid for string, integer, and number data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"2017-06-31T12:00:00.252805-07:00" |
| No |
"2017-06-30T12:00:00.252805-07:00" |
| Yes |
"2017-06-31" |
| No |
"2017-06-31" |
| Yes |
5 |
| No |
5 |
| Yes |
1.5 |
| No |
1.5 |
| Yes |
"abc" |
| No #ASCII value comparison |
"abc" |
| Yes #ASCII value comparison |
|
| Trigger error thrown |
"2017-06-31" |
| Trigger error thrown |
|
| Trigger error thrown |
1.5 |
| Trigger error thrown |
"abc" |
| Trigger error thrown |
less than
This condition checks if the trigger data is less than the value.
The trigger condition tells the recipe to only process new Shopify product variants if the variant price is less than 50
If value is set to a number, and the trigger data field has a null value, the recipe will raise a trigger error, as computationally, a number cannot be compared with a null value. To resolve this issue, add an is present condition along with the less than condition.
Valid types
This condition is valid for string, integer, and number data types.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"2017-06-31T12:00:00.252805-07:00" |
| Yes |
"2017-06-30T12:00:00.252805-07:00" |
| No |
"2017-06-31" |
| Yes |
"2017-06-31" |
| No |
5 |
| Yes |
5 |
| No |
1.5 |
| Yes |
1.5 |
| No |
"abc" |
| Yes #ASCII value comparison |
"abc" |
| No #ASCII value comparison |
|
| Trigger error thrown |
"2017-06-31" |
| Trigger error thrown |
|
| Trigger error thrown |
1.5 |
| Trigger error thrown |
"abc" |
| Trigger error thrown |
is true
This condition checks that the trigger data is true.
The trigger condition tells the recipe to only process new Shopify product variants if the variant's requires shipping field is marked as true
It can also be used to check that the formula provided in the trigger data input field evaluates to true. For example, you can convert string type datapills via string formulas into conditions that evaluates to a boolean, which can be found here, with an example as follows.
The trigger condition tells the recipe to only process new Quick Base opportunity records if the formula amount.blank? evaluates to true (i.e. if the amount field is blank)
Valid types
This condition is only valid for boolean data types. We can use this condition to check against a boolean datapill, or check against formula that evaluates to true
or false
.
Examples
Trigger data | Condition/value | Picked up by recipe? |
pill.present? |
| No #if pill has a |
pill.present? |
| Yes #if pill has a value |
"Advanced Solutions".include?("Solutions") |
| Yes |
"Advanced Solutions".include?("solutions") |
| No |
is not true
This condition is the opposite of the is true condition. It checks that the trigger data IS NOT true.
The trigger condition tells the recipe to only process new Salesforce cases if they are not closed
It can also be used to check that the formula provided in the trigger data input field evaluates to false. For example, you can convert string type datapills via string formulas into conditions that evaluates to a boolean, which can be found here, with an example as follows.
Examples
Trigger data | Condition/value | Picked up by recipe? |
pill.present? |
| No #if pill has a |
pill.present? |
| No #if pill has a value |
"Advanced Solutions".include?("Solutions") |
| No |
"Advanced Solutions".include?("solutions") |
| Yes |
is present
This condition will check the trigger data. If there is data present, the trigger event will be picked up by the recipe. If input is null or an empty string, the trigger event will not be picked up by the recipe.
The trigger condition tells the recipe to only process new Box files if the file has a name
Valid types
This condition is valid for all data types, for example, integers, and floats, dates, arrays.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"Advanced Solutions" |
| Yes |
12345 |
| Yes |
"" |
| No |
|
| No |
is not present
This condition will check the trigger data. If there is data present, the trigger event WILL NOT be picked up by the recipe. If input is null or an empty string, the trigger event WILL be picked up by the recipe.
The trigger condition tells the recipe to only process new Zendesk tickets with no agent assigned to it
Valid types
This condition is valid for all data types, for example, integers, and floats, dates, arrays.
Examples
Trigger data | Condition/value | Picked up by recipe? |
"Advanced Solutions" |
| No |
12345 |
| No |
"" |
| Yes |
|
| Yes |
#
#
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article