Trigger Workflows When a Post Is Deleted

Use the WordPress post-deleted trigger to start a workflow after a post is deleted. Review available post identifiers and test downstream steps carefully.

The Post Deleted trigger is available in the WordPress Post group in the AI Agent Workflows editor. It starts a workflow when WordPress fires the deleted_post hook. The exact timing depends on the event represented by that hook.

Screenshot to add: [Workflow editor showing the Post Deleted trigger and its configuration]

When this trigger fires

This trigger listens to the deleted_post hook. Several post-related hooks can fire during a single editing or publishing operation; choose the one that matches the point in the lifecycle when you need the workflow to start.

Data available to later nodes

For recognized post hooks, the plugin normalizes the event into fields such as source, event, post_id, post_title, post_content, post_content_text, post_excerpt, post_status, post_type, post_name, post_author, post_date, post_modified, and post_parent when the corresponding post data is available. Some hooks add event-specific values, such as old and new status or an update flag. Inspect a captured sample in the editor before relying on a particular field.

Configure the trigger

  1. Open the workflow in the visual editor and open the node picker.
  2. Select WordPress, then the Post group, and add Post Deleted.
  3. If the node exposes Post Types, leave it empty to include supported posts, pages, and custom post types, or enter comma-separated slugs such as post,page. Internal WordPress content types are skipped.
  4. Save the workflow and test the relevant event on a test site or with non-critical content. Inspect the trigger sample before mapping values to later nodes.

Source hook

Catalog hook: deleted_post. This reference describes the trigger registration in the supplied plugin source; it does not claim that a live event has been tested.