WordPress Automations
Add a Category or Tag to a Post Automatically When It's Published
Posts that skip tagging are hard to find later, and manual tagging is the first thing to slip on a busy site. Zapify can apply a category or tag for you with the A post is published trigger and the Set a post's terms action — both free.
What this automation does
The automation is one trigger plus one action:
- Trigger: A post is published (
WP_POST_PUBLISHED, WordPress) - Action: Set a post's terms (
WP_SET_POST_TERMS, WordPress)
When a post is published, Zapify adds the terms you specify to that post in the taxonomy you choose.
Before you start
- The category or tag should already exist, or you can enter a new name and WordPress will create it.
- Both the trigger and the action are free.
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 Auto-tag new posts.

Step 2: Add the "A post is published" trigger
- Click Add Trigger.

- Choose WordPress as the app.

- Select the trigger A post is published.

- Set the Post type (for example Post).
Step 3: Add the "Set a post's terms" action
- Click Add Action.

- Choose WordPress as the app.

- Select Set a post's terms.

Step 4: Configure the action
| Field | Required | What it does |
|---|---|---|
| Post ID | Yes | Insert the trigger's Post ID token so the action targets the post that was just published. |
| Taxonomy | Yes | The taxonomy to write to — Category (default), Tag, or a custom taxonomy. |
| Terms | Yes | Comma-separated term IDs, slugs or names, for example news, featured. |
| Replace existing terms | No | Off (default) adds to what the post already has. On replaces the post's terms in that taxonomy with just these. |

Replacing removes the default category
If you turn on Replace existing terms for the Category taxonomy, the post loses any categories the author picked — including WordPress's default "Uncategorized" fallback. Leave it off if you only want to add.
Step 5: Set the steps Live and save
- Set both the trigger and the action to Live.
- Click Save.

Tokens this action makes available
| Token | What it holds |
|---|---|
| Assigned term IDs | The IDs of the terms now attached to the post. |
How to test it
- Publish a test post.
- Open the post in the editor and check that the category or tag now appears.
- If it doesn't, open Zapify → Logs — the action reports if the post ID was empty, the taxonomy isn't registered, or no terms were given.
Conclusion
With the A post is published trigger and the Set a post's terms action, Zapify keeps your content organised without relying on authors to remember. Next, get alerted when a specific term is applied with an email when a term is added to a post.
FAQs
Can I enter more than one term?
Yes. Separate them with commas, for example news, featured.
Does this work for custom post types and custom taxonomies?
Yes. The trigger's Post type field and the action's Taxonomy field both list custom ones registered on your site.
Is this feature free?
Yes. Both the trigger and the action are free.
Do I need to write any code?
No. Everything is configured in the Zapify visual builder.