Use Add Condition to setup a condition for the action to execute. And only execute if the condition is met.
The Condition pop up has three fields.
- Enter the desired Condition Name.
- Select a Context Variable from the Variable Picker or create a new one. This context picker can be the output variable of any of the previous actions in the workflow.
- Select the Condition Criteria for the select variable.
For example, in a scenario, you want to check if the email address contains “workativ.com”, so you will use the Contains criteria for it.
- Select a context variable or enter text manually to specify the data you want the condition to be validated with.
NOTE: Only If the selected condition is a string or integer, you will get the Validate condition with field. In case of Boolean data type, the criteria is either True or False.
You can check if an email contains a specific pattern by choosing the User Email output from a previous action and selecting Contains on the dropdown and then specifying the pattern to be checked for as follows: (1) User Email → (2) Contains → (3) email@example.com
|Contains||String (A, B, C…)|
|Doesn’t contain||String (A, B, C…)|
|Starts with||String (A, B, C…)|
|Doesn’t start with||String (A, B, C…)|
|Ends with||String (A, B, C…)|
|Doesn’t end with||String (A, B, C…)|
|Equals||All Data Types|
|Does not equal||All Data Types|
|Greater Than||Integer (1,2, 3..)|
|Less Than||Integer (1,2, 3..)|
|Is True||Boolean (t/f)|
|Is False||Boolean (t/f)|
5. Click the Add More button to add a new condition.
6. Select And or Or radio button for the new condition.
NOTE: You can add any number of conditions on the Condition pop up using the following logic operators:
- And — Used to specify that conditions involved must get verified to perform an action.
- Or — Used to specify that verification of any one of the conditions is enough to perform an action.
7. Add the conditional inputs as explained previously.
Based on how you setup a condition, an uneditable summary of the condition will be displayed under the Summary field.
8. When you’re done, click Save to save the condition.