How to get Discord messages in n8n

Hey Everyone!

    I have a problem, which is I want to listen to the Discord messages but in n8n i sreach a lot, but i won’t find something that I want. I have used the Discord trigger but it came with a webhook, which means I have a webhook(URL) that I need to paste somewhere to listen to my messages on Discord. 

   If posssible give a reply fast i already wasted so much time in searching about it.

@Muhammad_Qasim2 Here’s a quick setup steps

1. In n8n:

  1. Add a Discord Trigger node to your workflow

  2. Select “Message Created” as the event

  3. Copy the Webhook URL that n8n generates

2. In Discord (Server Settings):

  1. Go to your Discord server

  2. Click Server Settings → Integrations → Webhooks

  3. Click “New Webhook” or “View Webhooks”

  4. Create a webhook for the channel you want to monitor

  5. Paste the n8n webhook URL into the Discord webhook URL field

  6. Save

3. Activate Your Workflow:

  • Turn on your n8n workflow

  • Test by sending a message in that Discord channel

Important Notes:

Discord doesn’t support “pull” methods, you can’t poll for messages like email. Webhooks are the standard way Discord sends real-time events.

Hope this helps!

2 Likes

The Discord webhook trigger in n8n works differently than you might expect.

Here’s what you need to do:

  1. Copy the webhook URL from your n8n Discord trigger node

  2. Go to Discord → Your Server → Server Settings → Integrations → Webhooks

  3. Create a new webhook or edit an existing one

  4. Paste the n8n webhook URL into the webhook URL field in Discord

  5. Select the channel you want to monitor

  6. Save it

However, there’s an important limitation: Discord webhooks are primarily for sending messages TO Discord, not listening to incoming messages.

For listening to Discord messages, you have better options:

  • Use n8n’s Discord node with a bot token instead of webhooks - this requires creating a Discord bot in the Discord Developer Portal, getting a bot token, and adding the bot to your server

  • Use a polling approach with the Discord API to check for new messages periodically

  • Consider using Discord.js in an n8n Code node if you need more complex listening capabilities

The fastest solution: Create a Discord bot (takes ~5 minutes) and use the bot token with n8n’s Discord node. This gives you proper message listening capabilities.

Hi @Muhammad_Qasim2! Hope you’re doing well. The n8n Discord Trigger only works when Discord sends events, such as bot events or interactions. If you need to capture normal messages, you must use a Discord bot with Message Content Intent enabled and forward those messages to n8n via HTTP. Could you confirm whether you need to capture all messages or only specific commands, and whether you already have a bot created?

1 Like

Thank you very much mam. I loved your advice.

1 Like

Yes sir now i am good thanks

thanks sir, I always wonder how can n8n manage his fast replay system>
Now promple is under control. Thanks

@Muhammad_Qasim2, happy to help.
Please consider marking the reply that helped you as the solution, as this supports the community and the contributors who take the time to help.

But sir where to paste my n8n webhook in discord

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.