The Set User Role trigger is listed in the WordPress User group in the AI Agent Workflows editor. It starts a workflow when WordPress fires the set_user_role hook. The exact timing follows that hook; not every user-related hook represents a completed account change.
Screenshot to add: [Workflow editor showing the Set User Role trigger]
When this trigger fires
This catalog entry listens to set_user_role. Check the hook’s timing and captured sample before connecting actions that modify accounts or send notifications.
Event data and privacy
User-trigger payloads use source, event, and hook arguments under args. WordPress user objects are converted to basic fields such as ID, login, email, and display name, but other scalar arguments may remain in the payload. Inspect a sample before mapping values.
Configure the trigger
- Open the workflow in the visual editor and open the node picker.
- Select WordPress, then User, and add Set User Role.
- Inspect a captured sample to understand the hook arguments. This catalog entry has no user-specific filter field.
- Save and test only with controlled data. Avoid storing or forwarding credentials and other sensitive account information.
Source hook
Catalog hook: set_user_role. This article is based on the supplied source code; it does not claim that a live event was tested.