Bulk delete Slack messages with smart filtering and confirmations
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (8)
- Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Wait
n8n-nodes-base.wait - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch
What it does
π§Ή Jedi Cleaner for Slack β Slack's Limitation Slack lacks a native bulk delete feature. Users must delete messages manually, which is time-consuming and inefficient for large volumes. β
Our Solution Jedi Cleaner automates Slack message deletion using smart filters, safety confirmations, and enterprise-grade reliability. --- π Key Features & Capabilities β‘ Lightning-Fast Bulk Operations Delete hundreds of messages in minutes Intelligent rate limiting prevents API throttling Auto-retry on failure ensures reliable operation π― Smart Message Filtering Keyword match β Find messages with specific terms User mentions β Target messages that mention specific users Exact phrases β Use quotes for precision Bot/User content β Handle mixed sources seamlessly --- π‘οΈ Enterprise-Grade Safety Confirmation workflow β No accidental deletions Timeout β Requests expire after 5 minutes Preview-first β Review messages before deletion Granular control β Choose exactly what to delete --- π Intelligent Search & Preview Flexible filters (words, phrases, patterns) Preview + count before deletion Multi-channel support with context isolation π Complete Workflow Management Auto-cleanup of bot messages after execution Real-time progress tracking Debug logs and audit trail Static data persistence and cleanup --- π§ͺ How It Works Phase 1: Search Request plaintext User: /cleanup "error messages" Bot Response: π Found 15 messages containing "error messages" π Breakdown: β’ Will be permanently deleted β’ Cannot be undone β’ Respond within 5 minutes β
Type: @cleanerjedi yes β Type: @cleanerjedi cancel Phase 2: User Confirmation plaintext User: @cleanerjedi yes Bot: ποΈ Deleting 15 messages containing "error messages" Phase 3: Completion plaintext β
Cleanup Complete β’ 15 messages deleted β’ Channel cleaned β’ Auto-deletes this message in 5 seconds --- π οΈ Technical Architecture Core Components Unified Webhook Handler Handles slash commands & mentions, deduplicates events Search Engine Integrates Slack API, parses & filters search terms Safety & Confirmation System Temporary storage, expiration logic, user auth Bulk Operations Engine Message deletion, progress tracking, error handling Cleanup & Memory Management Deletes bot messages, static data cleanup --- π± User Commands | Command | Description | Example | | ---------------------- | ----------------------------------- | -------------------------- | | /cleanup term | Search messages containing term | /cleanup "webhook error" | | @cleanerjedi yes | Confirm deletion | After preview | | @cleanerjedi cancel | Cancel pending deletion | Cancels active request | π§© Edge Cases | Scenario | Bot Response | | -------------------- | ---------------------------------------------- | | No messages found | "No messages found containing '\term'" | | Expired confirmation | "Request expired. Please run /cleanup again" | | No pending request | "No pending cleanup found. Run /cleanup first" | | Invalid search term | "Please provide a valid search term" | --- βοΈ Setup Requirements Slack App Configuration OAuth Scopes: plaintext β
chat:write β
chat:write.public β
channels:history β
groups:history β
appmentions:read β
commands Event Subscriptions: plaintext β
appmention β
message.channels Slash Command: plaintext Command: /cleanup URL: https://your-n8n.app.cloud/webhook/cleanerjedi Hint: search term n8n Workflow Setup Required Nodes: Webhook Trigger β Captures Slack events Respond to Webhook β Handles routing Switch Node β Event type routing Slack API Nodes β Search, delete, notify JavaScript Nodes β Logic & validation --- β‘ Advanced Features π§ Intelligent Deduplication javascript eventId = cmd${body.command}${body.userid}${body.triggerid}; if (staticData.recentEvents.includes(eventId)) { return ; // Skip duplicate } π Flexible Search Terms Single words: test Phrases: "error message" Special characters: webhook-failed Case-insensitive by default β»οΈ Auto-Cleanup javascript setTimeout(() => { deleteMessage(completionMessage.ts); dele