WordPress Automations
Send an Email When a User Is Added to a WordPress Role
Whenever someone gains a role that matters — editor, shop_manager, a custom role tied to a paid tier — it's often worth someone knowing, wherever the change came from: an admin editing a profile, a new registration, or another plugin granting access. Zapify does this with the A user is added to a role trigger and the Send an email action — both free.
This trigger fires on the underlying role-grant event itself, so it catches every way a role gets added — not just the specific "user registers" or "user logs in" moments covered by add a role to a new WordPress user and add a user role when someone logs in.
What this automation does
The automation is one trigger plus one action:
- Trigger: A user is added to a role (
WP_USER_ROLE_ADDED, WordPress) - Action: Send an email (
WP_SEND_EMAIL, WordPress)
When the role you choose is granted to a user — without removing any role they already had — Zapify fills the email's tokens and sends it.
Before you start
- The role you want to watch must already exist.
- 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 Notify when someone becomes an editor.

Step 2: Add the "A user is added to a role" trigger
- Click Add Trigger.

- Choose WordPress as the app.

- Select the trigger A user is added to a role.

- In the Role field, pick the specific role, or leave it on Any role.
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, watching for the editor role:
- To:
admin@example.com - Subject:
{{trigger:USER_DISPLAY_NAME}} is now an editor - Body:
Role granted: {{trigger:ROLE_ADDED}}. User email: {{trigger:USER_EMAIL}}.

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 |
|---|---|
| Role added | The role that was granted. |
| User tokens (User email, User display name, etc.) | The user who received the role. |
How to test it
- Grant the role you configured to a test user, either from Users → Edit User or through whatever plugin or signup flow normally assigns it.
- Check the recipient inbox for the email.
- If nothing arrives, open Zapify → Logs to see whether the run fired.
Conclusion
With the A user is added to a role trigger and the Send an email action, Zapify catches a role grant no matter where it came from. Next, watch for a role being swapped out entirely instead of added with an email when a WordPress user's role changes, or see the full picture in triggers and actions.
FAQs
Does this also fire when a user registers with this role as their default?
Yes. Registration, an admin editing a profile, and another plugin granting a role all go through the same underlying WordPress mechanism this trigger listens on.
What's the difference between this and "a WordPress user's role changes"?
This trigger fires when a role is added on top of whatever roles a user already has. A WordPress user's role changes fires when a user's role is replaced outright. Use whichever matches how roles are managed on your site.
Can I watch for more than one role?
Yes. Leave the Role field on Any role to catch every grant, or add a separate trigger for each specific role you want to watch.
Is this feature free?
Yes. Both the trigger and the Send an email action are free.
Do I need to write any code?
No. Everything is configured in the Zapify visual builder.