n8nflow.net logo

๐Ÿค– Discord Message Proxy: Bot Mentions โ†’ AI Actions

by David Ashbyโ€ขUpdated: Last update 2 months agoโ€ขSource: n8n.io
Loading workflow viewer...

Getting Started

Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator?

Join the community

๐Ÿ” What It Does

Listens for @mentions of your bot in Discord channels (without a native trigger).

Filters noise: Only processes messages:

    From authorized users (configurable).

    That mention your bot.

    Sent today (skips old messages).

Forwards cleaned messages to any webhook (e.g., your AI agent, like the GitHub MCP Server).

Replies in Discord with the webhookโ€™s response.

๐Ÿ› ๏ธ Key Features

โšก No Community Nodes: Uses official n8n nodes only (security-first!).

๐Ÿ”’ Role-Based Access: Restrict bot usage to specific users.

๐Ÿ—‘๏ธ Deduplication: Avoids processing the same message twice.

๐Ÿ”„ Scheduled Checks: Runs every X minutes (adjustable in the Schedule Trigger).

๐Ÿš€ Use Cases

Chat with your AI bot via Discord mentions.

Moderate channels: Auto-flag messages or ping moderators.

Build custom commands: Trigger workflows by mentioning your bot.

โš™๏ธ Setup Guide

๐Ÿค– Update Credentials: Ensure your Discord bot has Read Messages and Send Messages permissions.

๐Ÿ”ง Configure Variables: In the "Set Values" node:

    discordServerId: Your serverโ€™s ID.

    botId: Your botโ€™s user ID.

    authorizedUser: Who can trigger the bot (user ID).

๐ŸŒ Webhook Target: Point the HTTP Request node to your AI/webhook endpoint.

โฑ๏ธ Adjust Polling: Change the Schedule Trigger interval (default: every minute).

Note: This polls channels instead of true event-based triggersโ€”tradeoffs time for security!