Automated discord spam moderation with AI and human in the loop
This n8n template demonstrates how you can automate community moderation using human-in-the-loop functionality for Discord. The use-case is for detecting and...
🔌 Nodes & Integrations Used (5)
📖 Implementation & Setup Guide
This n8n template demonstrates how you can automate community moderation using human-in-the-loop functionality for Discord.
The use-case is for detecting and dealing with spam messages in a predefined and consistent way. Human-in-the-loop allows for a balance between overly aggressive bots and time and effort from the moderation team.
How it works * A scheduled trigger is used to scan the most recent messages in a Discord Channel. Messages are tagged via the "Remove Duplicates" node so they don't get processed again in the future. * Messages are grouped by user to allow for minimising of number of notifications sent. * An AI text classifier node is then used to detect for spam in each user's message. * When detected, a notification is sent to a moderation channel using the Send-and-wait mode for Discord. This notification comes with an n8n form and dropdown list of predefined actions to take in dealing with the spam messages. Once sent the workflow waits until a response is received. * Once a moderator selects an action, the workflow continues and carries out a predefined moderation action.
How to use * Depending on how busy your community is and subject to spammers, you may need to increase the scheduled interval. * Add as many or few moderation actions as required. * Remember to activate the workflow to get it started.
Requirements * Discord channel for messages to moderate * OpenAI for text classification
Customising this template * It is possible to cover multiple channels. Add as many as your community needs. * Not using Discord. The template can also work in slack or other services which offer the same bot functionality.
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Automated_discord_spam_moderation_with_AI_and_human_in_the_loop.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related Messaging & Chat Workflows
View All in Messaging & Chat →Add a bug to Linear via Slack command
Use Case When building a product it's important to discover and eliminate bugs as quickly as possible. Since we're using our product at n8n a lot, we wanted ...
AI Children s Storytelling on Telegram
Production-ready n8n automation template for AI Children s Storytelling on Telegram built by AhiXLight. Seamlessly connects Lm Chat Open Ai, Chain Summarization, Text Splitter Recursive Character Text Splitter with 14 configured nodes.
AI Event Banner Generator with BannerBear
Production-ready n8n automation template for AI Event Banner Generator with BannerBear built by AhiXLight. Seamlessly connects Form Trigger, HTTP Request, Bannerbear with 16 configured nodes.
AI Event Banner Generator with n8n
Production-ready n8n automation template for AI Event Banner Generator with n8n built by AhiXLight. Seamlessly connects Form Trigger, HTTP Request, Bannerbear with 16 configured nodes.