Workato recipes regularly contain compound conditional actions of the same type ('If X and Y and Z' or 'If X or Y or Z').
But how do we mix different conditional actions ('If X and [Y or Z]')?
While conditional actions must be of the same type, we can effectively mix conditions by using formula mode.
For example, what if we want a recipe to only trigger when:
- "Start Time" is present
- and either "User ID" or "Recipe ID" are present
In order to add an OR condition, we will click the blue formula mode toggle button at the right side of the second "Trigger data" field:
We will use the ".present?" method with OR, and change the condition to "is true". Our trigger conditions are changed to now look like this:
Now, when the recipe is run, it will only be triggered when:
- Start time is present
- AND (User ID or Recipe ID are present)