WordPress Automations
Send an Email When Any WordPress Hook Fires
Zapify has dedicated triggers for the common events, but WordPress and its plugins fire thousands of hooks. The A WordPress hook fires trigger lets you react to any of them, and the Send an email action tells you when it happens. Both are free.
For the full reference to this trigger, see Utilities.
What this automation does
The automation is one trigger plus one action:
- Trigger: A WordPress hook fires (
UTIL_CUSTOM_HOOK, Utilities) - Action: Send an email (
WP_SEND_EMAIL, WordPress)
Whenever the hook you name fires, Zapify captures the values it passed and includes them in the email.
Before you start
- Know the exact hook name, for example
woocommerce_order_status_completed. Plugin documentation usually lists them. - Both the trigger and the action are free.
Very early hooks can't be caught
Hooks that fire before plugins_loaded — such as muplugins_loaded — have already run by the time Zapify starts, so a trigger on one never fires and shows no error.
How to build the automation
Step 1: Create a new automation
- In the WordPress admin, go to Zapify → Automations.
- Click Add New to open the builder.
- Name it clearly, such as Alert on custom hook.

Step 2: Add the "A WordPress hook fires" trigger
- Click Add Trigger.

- Choose Utilities as the app.

- Select A WordPress hook fires.
- Fill in the fields:
| Field | Required | What it does |
|---|---|---|
| Hook name | Yes | The name passed to do_action(). |
| Arguments to capture | No | How many values the hook passes. Defaults to 1. |
| Priority | No | Raise it to run after other plugins finish writing their data. Defaults to 10. |
If you don't know how many arguments the hook passes, press Listen, make the hook fire (visit the page or submit the form), and Zapify shows what it captured.

Step 3: Add the "Send an email" action
- Click Add Action.

- Choose WordPress as the app.

- Select Send an email.

Step 4: Configure the email
For example:
- To:
dev@example.com - Subject:
Hook fired: {{trigger:HOOK_NAME}} - Body: insert the Argument 1 token to include the first value the hook passed.

Step 5: Set the steps Live and save
- Set both the trigger and the action to Live.
- Click Save.

Tokens you can use
| Token | What it holds |
|---|---|
| Hook name | The hook that fired. |
| Argument 1, 2, 3… | One per captured argument, in order. |
If an argument is an array or object, Zapify also exposes a token per property inside it.
How to test it
- Make the hook fire — visit the page or perform the action that triggers it.
- Check the recipient inbox.
- If nothing arrives, open Zapify → Logs, and re-check the hook name for typos.
Conclusion
With the A WordPress hook fires trigger and the Send an email action, Zapify can react to events it has no dedicated trigger for. Next, read the full Utilities reference, or write values to the run log while debugging.
FAQs
How do I find a hook's name?
Check the plugin's developer documentation, or search its source for do_action(.
Is this feature free?
Yes. Both the trigger and the action are free.
Do I need to write any code?
No — you only need to know the hook name.