3 templates found
Category:
Author:
Sort:

Post RSS feed items from yesterday to Slack

This workflow will collect the RSS feed data from the previous day and post them to a Slack channel. To use this workflow you will need to add your credentials to the Slack node and select the channel for notifications. You will also need to input the URL for the RSS feed.

JonathanBy Jonathan
4003

Simple file based key value store (WriteKey)

Store a key with a value in a local json file. Multiple keys could be saved in a single file. Related workflow: GetKey Create a subfolder in your n8n homedir: /home/node/.n8n/local-files. In docker look at the data path and create a subfolder local-files. Set the correct access rights chmod 1000.1000 local-files. Put the workflow code in a new workflow named WriteKey. Create another workflow with a function item: js return { file: '/4711.json', // 4711 should be your workflow id key: 'MyKey', value: 'MyValue' } Pipe the function item to an Execution Workflow that calls the WriteKey workflow. It would be nice if we could get someday a shiny built-in n8n node that does the job. :)

PeterBy Peter
1677

Bulk delete Slack messages with smart filtering and confirmations

🧹 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: @cleaner_jedi yes ❌ Type: @cleaner_jedi cancel Phase 2: User Confirmation plaintext User: @cleaner_jedi 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" | | @cleaner_jedi yes | Confirm deletion | After preview | | @cleaner_jedi 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 βœ… app_mentions:read βœ… commands Event Subscriptions: plaintext βœ… app_mention βœ… 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.trigger_id}; 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); deleteMessage(progressMessage.ts); }, 5000); 🧠 Storage Management Temp storage for requests Auto-expiry cleanup Memory-safe event trimming --- πŸ“Š Error Handling & Logging Error Scenarios plaintext ❌ Invalid term ⏰ Expired request 🚫 Access denied ⚠️ Rate limit hit Debugging & Monitoring Event IDs, timestamps Key-value storage info API response codes --- βœ… Usage Examples Example 1: Delete Error Messages plaintext /cleanup "error" β†’ Bot: Found 23 messages β†’ @cleaner_jedi yes β†’ βœ… Deleted 23 messages Example 2: Cancel Midway plaintext /cleanup "from:@john" β†’ Bot: Found 8 messages β†’ @cleaner_jedi cancel β†’ ❌ Operation cancelled Example 3: Search by Date plaintext /cleanup "2024-01-15" β†’ Bot: Found 12 messages β†’ @cleaner_jedi yes β†’ βœ… 12 messages deleted --- πŸ”’ Security & Safety βœ… User confirmation required βœ… 5-minute time limits βœ… Permission-aware deletions βœ… Audit trail logging --- πŸš€ Performance Optimizations Minimal webhook/API usage Batch deletion Cached recent events Memory Handling: Temp data cleanup Key expiration Cache trimming --- πŸ“ˆ Monitoring & Analytics Metrics Tracked Messages per operation User response times Failure & error rates Storage performance Logging javascript console.log('βœ… SUCCESS:', operationDetails); console.warn('⚠️ WARNING:', warningDetails); console.error('❌ ERROR:', errorDetails); console.info('ℹ️ INFO:', informationDetails); --- πŸŽ‰ Summary For Users βœ… Simple commands βœ… Preview + safety βœ… Fast processing βœ… Clear status feedback For Admins βœ… Lower API load βœ… Full logging βœ… Resilient to errors βœ… Lightweight memory footprint For Developers βœ… Modular, clean code βœ… Well-documented βœ… Scalable & robust βœ… Easy to extend --- PDF how to do Document Included

Elie KattarBy Elie Kattar
91
All templates loaded