Back to Templates

🤖 Discord Message Proxy: Bot Mentions → AI Actions

Created by

Created by: David Ashby || cfomodz

David Ashby

Last update

Last update a month ago

Share


🔍 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!