Zapify Utilities: Custom Hooks, Log Notes, and Variables
Utilities is Zapify's own toolbox: the free A WordPress hook fires trigger, which reacts to anything Zapify doesn't have a dedicated trigger for, and two actions — Write a note to the log and Set a variable — that operate on the automation itself rather than on WordPress, WooCommerce, or anything else. All three ship in the free plugin.
A WordPress hook fires (trigger)
Zapify ships triggers for the events somebody thought to build one for. This trigger covers the rest — any do_action() call, in WordPress core, in any plugin, or in your theme.
The fields
| Field | Required | What it does |
|---|---|---|
| Hook name | Yes | The name passed to do_action() — for example woocommerce_order_status_completed. |
| Arguments to capture | No | How many values the hook passes. Defaults to 1. |
| Priority | No | The priority Zapify binds at. Raise it to run after other plugins have finished writing their data. Defaults to 10. |
Finding out what a hook passes
You often don't know how many arguments a hook carries, or what they contain, without reading the plugin's source. Use Listen: name the hook, press Listen, then go and make it fire — visiting the page, submitting the form, whatever triggers it. Zapify captures the real firing and shows you the arguments, their types, and a token for each.
Hooks that fire too early cannot be caught
Zapify binds its hook map at plugins_loaded, priority 5. muplugins_loaded, registered_taxonomy, registered_post_type, and plugins_loaded itself have all already fired by then, so a trigger watching one of these never runs — silently, with nothing wrong visible in the builder. If your custom hook fires that early, there's no way to catch it with this trigger.
Tokens this trigger exposes
| 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 — an order, a post, a user — Zapify also exposes a token per property inside it (for example ARG_1_TOTAL), the same way a webhook payload is flattened. See webhooks for more on how nested data becomes tokens.
Write a note to the log (action)
Drops a line into the automation's run log, with any tokens already resolved to their real values. It's the fastest way to see what a token actually contained at a specific point in a run, without guessing.
| Field | Required | What it does |
|---|---|---|
| Note | Yes | The text to log. Insert tokens to see what they resolved to. |
Runs inline, in order — so a note placed between two actions shows the state at exactly that point, not after the rest of the automation has already run. Notes over 2,000 characters are truncated in the log.
Set a variable (action)
Computes a value once and gives it a name the rest of the automation can reference, instead of rebuilding the same token combination in every action that needs it.
| Field | Required | What it does |
|---|---|---|
| Name | Yes | Letters, numbers, and underscores only. Referenced afterwards as this action's VALUE token. |
| Value | No | The value to store. Tokens are resolved before it's stored. |
How to test it
For the trigger, use Listen as described above rather than guessing at argument counts. For either action, add a Write a note to the log action right after it in a test automation, insert its output token, and check Zapify → Logs to confirm the value is what you expected.
Conclusion
Utilities is the escape hatch and the toolbox: the A WordPress hook fires trigger reaches anything Zapify has no dedicated trigger for, and Write a note to the log and Set a variable help you build and debug automations without writing code. All three are free. For turning raw hook arguments into something more structured, see how tokens work more generally in triggers and actions.
FAQs
Is Utilities free?
Yes. The custom hook trigger and both actions described here ship in the free plugin.
Why didn't my custom hook trigger fire?
Check the hook isn't one of muplugins_loaded, registered_taxonomy, registered_post_type, or plugins_loaded — these fire before Zapify is loaded and can never be caught. Otherwise, confirm the hook name is spelled exactly as the plugin calls do_action(), and that the automation and trigger are both set to Live.
How do I know how many arguments a hook passes?
Use the trigger's Listen button, then go make the hook fire for real. Zapify shows you the captured arguments and their types once it catches a firing.
Can I use Set a variable to avoid repeating a token in several actions?
Yes — that's exactly what it's for. Compute the value once, name it, and reference {{variable:your_name}} (or the action's own VALUE token) wherever you'd otherwise repeat the same combination of tokens.
Does writing a log note slow down the automation?
No meaningfully — it runs inline and only writes a short line to the log. It's meant to be left in place while you're debugging and removed once you're satisfied the automation behaves correctly, though there's no requirement to remove it.
Do I need to write any code?
No. Both actions and the trigger are configured through the Zapify builder. The trigger only asks for a hook name — you don't need to read the plugin's PHP to use Listen and see what it passes.