This feature requires Uncanny Automator Pro 3.5 or higher.
Action conditions make it possible to run actions only if specific criteria are met, like a user’s email address matching a certain name, the user having a certain WordPress role, or a form submission having a specific value. Conditions are an optional setting that can be defined for every action in a recipe.
To add a condition to an action, hover over the action and look for the Filter button. It looks like this:
When you add a filter, you can set the condition that will cause the action to run. There are 3 parts to a condition:
- The token that a value will be checked against, so maybe this is a date, email address, role, or a token associated with a trigger in the recipe
- The criteria that determines whether the token matches a certain value, like “is”, “contains”, “is greater than”, etc.
- The value that the token is compared to. This might be hardcoded (e.g. a domain like “uncannyowl.com”) or use a token.
This is what it looks like:
To add a condition to a recipe, make sure each of the 3 fields are populated and click Save condition.
Every action can include one or more conditions. When you add conditions, you will see them displayed as part of an action, like this:
The action in the screenshot above includes 2 conditions. When more than 1 condition is associated with a recipe, you can choose whether to run the action if all conditions apply or to run it when any conditions apply.
As you get started with conditions, here are a few other tips to guide your usage:
- Condition values are not case sensitive.
- The order of conditions does not matter.
- Actions with conditions can still be delayed. If they are delayed, conditions are evaluated at the time the action is run, NOT at the time the action is queued.