Streamline WordPress site maintenance using this powerful n8n workflow template. Automatically fetch and delete 'pending' posts and their corresponding featured images using custom n8n node configuration.
Download this n8n workflow template and start using it instantly.
WordPress Site Administrators requiring an automated maintenance n8n solution.
Content Managers needing to implement a rigorous post rejection and cleanup process.
Technical users seeking advanced n8n templates for interacting with external APIs via HTTP requests.
Anyone looking for an efficient batch deletion solution built using the low-code power of n8n.
Managing high volumes of content often results in clutter, particularly posts stuck in statuses like 'pending review'. Manually deleting these posts and ensuring their featured media files are also removed can be a tedious and error-prone task. This custom n8n workflow solves this by providing a hands-free method to systematically query your WordPress site for posts matching specific criteria (e.g., status: pending) and performing a forced deletion of both the post and its associated featured image. This particular n8n workflow is designed for high scalability, ensuring your WordPress database remains clean. The core of this n8n solution leverages the HTTP Request n8n node for seamless API communication, making it a highly valuable addition to your n8n templates library.
This automation starts with the 'Change your Domain here' n8n trigger node, which is a Manual Trigger used here to set the base URL for the WordPress installation.
/wp/v2/posts) specifically filtering for posts with the status: pending parameter.featured_media ID greater than 0.DELETE method and force: true to permanently remove the media item. Finally, a subsequent HTTP Request n8n node ('delete post with img') deletes the main WordPress post, also using force: true.DELETE operation on the WordPress post. This entire process defines a robust and conditional n8n workflow pattern.To deploy this powerful n8n workflow template, follow these steps:
wpUrl property to your specific WordPress domain (e.g., https://your-site.com). Change your Domain here (Manual Trigger n8n Trigger): Acts as the entry point and configures the wpUrl parameter needed by all subsequent HTTP Request n8n node steps.
get post (HTTP Request n8n node): Function: Queries the WordPress REST API for posts. Key Configuration: Targets the /wp/v2/posts endpoint and filters for status: pending.
Filter (Filter n8n node): Function: Currently restricts processing to the first item ($itemIndex < 1). For batch processing using this n8n template, this node should be removed.
Has Img (If n8n node): Function: Routes the workflow based on whether the post object contains a featured image ID (featured_media != 0).
delete img (HTTP Request n8n node): Function: Executes a forced DELETE request against the media endpoint, ensuring the featured image is permanently removed.
delete post (HTTP Request n8n node): Function: Executes a forced DELETE request against the post endpoint for items that did not have a featured image.
DELETE request against the post endpoint after its corresponding featured media has been successfully deleted.Use this comprehensive n8n workflow template to automate the batch conversion of CAD/BIM files (RVT, IFC, DWG, DGN) into structured XLSX data and DAE 3D models. Features file validation, custom scripting, and automated HTML reporting via an n8n node pipeline.

Use this efficient n8n workflow to batch multiple Airtable insertions or updates into a single API call, speeding up data synchronization by up to 9 times. Ideal for high-volume data operations.

Build an advanced Retrieval-Augmented Generation (RAG) system using an n8n workflow. Load documents, embed with Cohere, and generate fast, knowledgeable answers via the Groq chat model.

Automate batch ID photo enhancement using this n8n workflow. Scans Google Drive for images, processes them with the Nano Banana AI model via Defapi.org, and securely uploads the enhanced, professional results back to Drive. Get this n8n template now.

Use this efficient n8n workflow to automatically categorize and analyze customer feedback stored in Google Sheets using OpenAI. Perform sentiment and emotion analysis using optimized batch processing methods.









































