πŸ€– Discord Message Proxy: Bot Mentions β†’ AI Actions

Nodes

ff11a5cb-472b-475a-9957-b9b9edf01e7b3b9f1b78-6b80-4575-aa6c-9669870003892e3e39e3-0e17-4fae-9ac5-9ee31f9711edf8a78d87-81e0-408b-9fb5-fb2c36ca21ae

Created by

DaDavid Ashby

Last edited 10 days ago

πŸ” 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!

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!