Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add common issues to Discord node #2732

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
title: Discord node common issues
description: Documentation for common issues and questions in the Discord node in n8n, a workflow automation platform. Includes details of the issue and suggested solutions.
contentType: integration
priority: high
---

# Discord node common issues

Here are some common errors and issues with the [Discord node](/integrations/builtin/app-nodes/n8n-nodes-base.discord/) and steps to resolve or troubleshoot them.

## Add extra fields to embeds

Discord messages can optionally include embeds, a rich preview component that can include a title, description, image, link, and more.

The Discord node supports embeds when using the **Send** operation on the **Message** resource. Select **Add Embeds** to set extra fields including Description, Author, Title, URL, and URL Image.

To add fields that aren't included by default, set **Input Method** to **Raw JSON**. From here, add a JSON object to the **Value** parameter defining the [field names](https://discord.com/developers/docs/resources/message#embed-object) and values you want to include.

For example, to include `footer` and `fields`, neither of which are available using the **Enter Fields** Input Method, you could use a JSON object like this:

```json
{
"author": "My Name",
"url": "https://discord.js.org",
"fields": [
{
"name": "Regular field title",
"value": "Some value here"
}
],
"footer": {
"text": "Some footer text here",
"icon_url": "https://i.imgur.com/AfFp7pu.png"
}
}
```

You can learn more about embeds in [Using Webhooks and Embeds | Discord](https://discord.com/safety/using-webhooks-and-embeds).

If you experience issues when working with embeds with the Discord node, you can use the [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) with your existing Discord credentials to `POST` to the following URL:

```
https://discord.com/api/v10/channels/<CHANNEL_ID>/messages
```

In the body, include your embed information in the message content like this:

```json
{
"content": "Test",
"embeds": [
{
"author": "My Name",
"url": "https://discord.js.org",
"fields": [
{
"name": "Regular field title",
"value": "Some value here"
}
],
"footer": {
"text": "Some footer text here",
"icon_url": "https://i.imgur.com/AfFp7pu.png"
}
}
]
}
```

## Mention users and channels

To mention users and channels in Discord messages, you need to format your message according to [Discord's message formatting guidelines](https://discord.com/developers/docs/reference#message-formatting).

To mention a user, you need to know the Discord user's user ID. Keep in mind that the user ID is different from the user's display name. Similarly, you need a channel ID to link to a specific channel.

You can learn how to enable developer mode and copy the user or channel IDs in [Discord's documentation on finding User/Server/Message IDs](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID).

Once you have the user or channel ID, you can format your message with the following syntax:

* **User**: `<@USER_ID>`
* **Channel**: `<#CHANNEL_ID>`
* **Role**: `<@&ROLE_ID>`
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ Refer to [Discord's documentation](https://discord.com/developers/docs/intro){:t

--8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

## Common issues

For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/app-nodes/n8n-nodes-base.discord/common-issues/).
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ nav:
- DeepL: integrations/builtin/app-nodes/n8n-nodes-base.deepl.md
- Demio: integrations/builtin/app-nodes/n8n-nodes-base.demio.md
- DHL: integrations/builtin/app-nodes/n8n-nodes-base.dhl.md
- Discord: integrations/builtin/app-nodes/n8n-nodes-base.discord.md
- Discord:
- Discord: integrations/builtin/app-nodes/n8n-nodes-base.discord/index.md
- Common issues: integrations/builtin/app-nodes/n8n-nodes-base.discord/common-issues.md
- Discourse: integrations/builtin/app-nodes/n8n-nodes-base.discourse.md
- Disqus: integrations/builtin/app-nodes/n8n-nodes-base.disqus.md
- Drift: integrations/builtin/app-nodes/n8n-nodes-base.drift.md
Expand Down
Loading