Skip to content

Managing triggers

A trigger is the event that starts a recipe. It can be almost anything that happens on a WordPress site: a user logs in, completes a purchase, submits a form with specific entries, finishes a course, or publishes a post. Every recipe needs at least one trigger. This article covers adding and setting up a trigger in the Uncanny Automator 8.0 recipe builder, the controls on a trigger’s node, combining triggers, and the tokens a trigger provides to the actions that follow.

Adding a trigger

  1. Open the recipe, or create one from Automator > Add new recipe (see Creating a recipe).
  2. Click + Add trigger in the Triggers section of the canvas. The picker opens on its Integration step.
  3. Choose the integration: the plugin or app whose event you want to watch. For WordPress itself (logins, posts, comments, roles), choose WordPress Core. Search by name, or browse the suggestions and the All integrations list. With Ready-to-use only on, the picker shows only integrations that are installed, connected, and included in your plan; see Finding integrations in the recipe builder.

The picker opened from Add trigger, on the Integration step, with trigger suggestions under You might be looking for, and WordPress Core in the Recently used integrations group and the All integrations list

  1. Choose the trigger. The picker moves to its Trigger step and lists every trigger the integration offers, each with a sentence such as A user publishes a post and a short description of when it fires. Items that need Uncanny Automator Pro carry a Pro label. Scroll the list or type in the search box to find the one you want.

The picker on its Trigger step for WordPress Core, with the Back button, the item count, and triggers with their descriptions down to A user publishes a post

Setting up the trigger

Choosing a trigger opens it in the Set up step. The sentence appears at the top with the editable part highlighted, and the fields below are where you set it.

The Set up step for the trigger A user publishes a post, with Post selected in the Post type field, a Custom trigger label filled in, and the Cancel and Save buttons

  • Fields — each highlighted part of the sentence has a field. Most are dropdowns loaded from your site, such as Post type; click Refresh options if something you created a moment ago is missing. A field marked with an asterisk is required. Many triggers offer an “Any” option, which fires on every matching event rather than one specific item.
  • Custom trigger label — an optional name for this step. As the field says, it “won’t change functionality but makes automation easier to manage”. On the canvas the label becomes the node’s bold title, with the trigger’s sentence in grey beneath it, which helps when a recipe has several similar triggers. In Automator > Logs, a run’s Details view also shows the label above the trigger’s sentence.

Click Save to add the trigger to the recipe. Triggers that come with a test, the incoming webhook triggers and the Plugin Actions trigger in Uncanny Automator Pro, also show Test, which opens the Test step; see Testing triggers and actions. Click Cancel, or press Esc, to close without saving your changes.

The trigger on the canvas

The saved trigger appears as a node in the Triggers section, showing the integration, the sentence with your values filled in, and three controls.

A trigger node on the canvas with its On switch and the three-dot menu open showing Duplicate and Delete, with the Add trigger button beside the node

  • On / Off — a new trigger is On. Switch it Off to keep the trigger in the recipe without watching for its event, for example while you rebuild it. An Off trigger is left out when the recipe checks its triggers: with any logic the recipe runs when one of its On triggers fires, and with all logic only the On triggers need to fire. Switching off the last trigger that is On also switches the recipe to Recipe off.
  • ⋮ — appears when you point at the node and opens Duplicate, which adds a copy of the trigger with the same values, and Delete, which removes it from the recipe after you confirm.
  • Click anywhere else on the node to reopen the Set up step and change the values. Changes save when you click Save; the recipe itself saves automatically.

The recipe watches for its triggers only while Recipe on is switched on in the top bar. A trigger that is On inside a recipe that is off does nothing.

Using more than one trigger

A Logged-in users recipe can have several triggers. Click + Add trigger again and repeat the steps above. As soon as the recipe has two triggers, a sentence appears below the trigger nodes, where their lines meet: Run recipe when All of the triggers are completed. A second trigger starts with All. Click the All dropdown in the sentence (Change trigger logic) and choose Any or All to switch between them.

A recipe with two triggers side by side, the sentence Run recipe when All of the triggers are completed below them, and its dropdown open showing the Any and All options

  • Any — the actions run as soon as one of the triggers completes. Use it when several different events should lead to the same result, such as a purchase or a manual enrollment both granting access.
  • All — the actions run only after every trigger has completed for the same user. Use it when a user must do several things first, such as completing two courses before a certificate is sent. This is the default.

Recipes for Everyone are limited to a single trigger, because there is no logged-in user whose completed triggers Automator could track. Once an Everyone recipe’s trigger is saved you cannot add another, and Diagram view shows no + Add trigger button. See Recipe types: logged-in users and everyone.

Tokens from triggers

Each trigger provides tokens: pieces of data about the event, such as the post title, the form entry values, the course name, or the user’s email address. They become available to every action in the recipe, in the token picker that the ∗ button at the end of a field opens. Which tokens you see depends on which triggers the recipe has, so add your triggers before you set up actions that need their data. For the incoming webhook and Plugin Actions triggers, the tokens come from the data captured in the trigger’s test. See Managing tokens.

Things to know

Important: Automator starts watching for a trigger’s event only after the trigger is saved and the recipe is on. Recipes cannot run against things that happened in the past. A recipe triggered by a purchase, for example, runs only for purchases made after the recipe was switched on; there is no way to run it for earlier purchases.

The integrations and triggers you can choose depend on the plugins active on your site and on your Uncanny Automator plan. A trigger that belongs to a plugin that is missing or switched off is hidden while Ready-to-use only is on and labelled Not installed or Not active when it is off.

Next: Managing actions, Testing triggers and actions, Managing tokens

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top