Trigger Workflows When a User Logs Out

Learn how the WordPress logout trigger starts a workflow and how to inspect the event sample before using it in downstream steps.

The WP Logout trigger is listed in the WordPress User group in the AI Agent Workflows editor. It starts a workflow when WordPress fires the wp_logout hook.

Screenshot to add: [Workflow editor showing the WP Logout trigger]

When this trigger fires

This catalog entry listens to wp_logout. Review the captured sample and confirm the event’s timing before connecting account-management or notification actions.

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. Other scalar arguments may remain in the payload; inspect a sample before mapping fields.

Configure the trigger

  1. Open the workflow in the visual editor and open the node picker.
  2. Select WordPress, then User, and add WP Logout.
  3. Inspect a captured sample to understand the available arguments. This catalog entry has no user-specific filter field.
  4. Save and test with controlled data. Forward only the information required by later steps.

Source hook

Catalog hook: wp_logout. This guide is based on the supplied source code; live execution has not been tested.