Hook up trigger
Trigger starts workflow at specified WordPress action or filter. It registers the workflow with WordPress hook system. The name of an action or filter is provided by WordPress or third-party plugin or theme. That name defines when your workflow will be started. This trigger is very handy if you want to customize your site by using WordPress hook system.
You cannot use any WordPress hooks that occurred earlier than init action. You can use actions from third-party plugins and themes that occurs later than init action.
Priority of execution is optional, lower numbers correspond with earlier execution.
First argument, passed by WordPress (or another plugin, or theme) can be gotten in the workflow with pattern {TRIGGER}
, other optional arguments can be gotten with patterns like {ARG[1]}, {ARG[2]}
and so on.
If you want to limit starting the workflow with some condition you have to select rule with Condition to start workflow and select necessary Conditional tag. If selected Conditional tag requires some parameter to perform checks use field Pass as parameter to specify necessary value. For instance, for Single post any type you can set optional parameter that should match existing post ID or post title.
What is conditional tag?
All of the Conditional Tags test to see whether a certain condition is met, and then returns either TRUE or FALSE. Read more on wordpress.org.
What is the difference between WordPress filters and actions?
Actions allow you to add extra functionality or content at a specific point during the rendering of the web page—for example, you might want to add extra widgets or menus, or add a subscription form at the end of the page.
Filters can modify data as it is processed — for example, you might want to add Google Analytics code to the footer of the page or insert some additional content in a post title, or modify some of your pages blocks.
Note: Any filter must return a value to WordPress core. Action do not have.
If you want to create a filter, read first Using workflow as WordPress filter.
Read more about WordPress actions: https://codex.wordpress.org/Plugin_API/Action_Reference.