{"id":926,"date":"2026-10-18T13:14:33","date_gmt":"2026-10-18T13:14:33","guid":{"rendered":"http:\/\/plugin-docs.com\/?post_type=doc&#038;p=926"},"modified":"2026-10-18T13:27:26","modified_gmt":"2026-10-18T13:27:26","slug":"wordpress-delete-post-trigger","status":"publish","type":"doc","link":"https:\/\/dragwyb.com\/docs\/wordpress-delete-post-trigger\/","title":{"rendered":"Use the WordPress Delete Post Trigger"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <strong>Delete Post<\/strong> trigger is available in the WordPress <strong>Post<\/strong> group in the AI Agent Workflows editor. It starts a workflow when WordPress fires the <code>delete_post<\/code> hook. The exact timing depends on the event represented by that hook.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Screenshot to add: [Workflow editor showing the Delete Post trigger and its configuration]<\/p>\n\n\n<h2 class=\"wp-block-heading\">When this trigger fires<\/h2>\n\n\n<p class=\"wp-block-paragraph\">This trigger listens to the <code>delete_post<\/code> 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.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Data available to later nodes<\/h2>\n\n\n<p class=\"wp-block-paragraph\">For recognized post hooks, the plugin normalizes the event into fields such as <code>source<\/code>, <code>event<\/code>, <code>post_id<\/code>, <code>post_title<\/code>, <code>post_content<\/code>, <code>post_content_text<\/code>, <code>post_excerpt<\/code>, <code>post_status<\/code>, <code>post_type<\/code>, <code>post_name<\/code>, <code>post_author<\/code>, <code>post_date<\/code>, <code>post_modified<\/code>, and <code>post_parent<\/code> 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.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Configure the trigger<\/h2>\n\n\n<ol class=\"wp-block-list\">\n\n<li>Open the workflow in the visual editor and open the node picker.<\/li>\n\n\n<li>Select <strong>WordPress<\/strong>, then the <strong>Post<\/strong> group, and add <strong>Delete Post<\/strong>.<\/li>\n\n\n<li>If the node exposes <strong>Post Types<\/strong>, leave it empty to include supported posts, pages, and custom post types, or enter comma-separated slugs such as <code>post,page<\/code>. Internal WordPress content types are skipped.<\/li>\n\n\n<li>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.<\/li>\n\n<\/ol>\n\n\n<h2 class=\"wp-block-heading\">Source hook<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Catalog hook: <code>delete_post<\/code>. This reference describes the trigger registration in the supplied plugin source; it does not claim that a live event has been tested.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Learn how the delete-post hook trigger starts a workflow during post deletion and how to inspect its event payload before mapping later steps.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":956,"menu_order":0,"template":"","class_list":["post-926","doc","type-doc","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/926\/revisions"}],"predecessor-version":[{"id":977,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/926\/revisions\/977"}],"up":[{"embeddable":true,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/956"}],"wp:attachment":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/media?parent=926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}