๐Ÿš€ More Vendrato tools: FunnelDupe โ€ข GHL Utils
๐ŸŽฎ

Discord - Send Rich Embed Message

n8n-nodes-base.httpRequest

Send richly formatted Discord messages with embeds, fields, and thumbnails using Discord webhook API. Better formatting than standard Discord node.

discord webhook notifications gaming community
App Discord
Category automation
Version 1.0.0
Author Community
Credentials Discord Webhook URL

๐Ÿ’ก Use Cases

๐Ÿ“‹ Node Configuration

{
  "nodes": [
    {
      "parameters": {
        "content": "## ๐ŸŽฎ POST Rich Embed Message to Discord\n\nCreates beautifully formatted Discord embed messages with thumbnails, fields, and custom styling.\n\n**Required Parameters:**\n- `webhookUrl`: Discord webhook URL\n- `embed.title`: Embed title text\n- `embed.description`: Main embed description\n- `embed.fields`: Array of field objects (name, value, inline)\n\n**Use Case:**\nSend rich, visually appealing notifications to Discord channels with structured data, thumbnails, custom colors, and multiple fields for better readability.",
        "height": 238,
        "width": 389,
        "color": 4
      },
      "id": "sticky-discord-embed-001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        96,
        332
      ],
      "meta": {
        "templateCredsSetupCompleted": true,
        "instanceId": "88a4b441e9a4af333af67be3c0ab8888b79ffa2aca1a09ed7a885e93b689b75f"
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $json.webhookUrl }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"embeds\": [\n    {\n      \"title\": \"{{ $json.title }}\",\n      \"description\": \"{{ $json.description }}\",\n      \"color\": {{ $json.color || 5814783 }},\n      \"fields\": [\n        {\n          \"name\": \"Status\",\n          \"value\": \"{{ $json.status }}\",\n          \"inline\": true\n        },\n        {\n          \"name\": \"Updated\",\n          \"value\": \"{{ $json.timestamp }}\",\n          \"inline\": true\n        }\n      ],\n      \"thumbnail\": {\n        \"url\": \"{{ $json.thumbnailUrl || '' }}\"\n      },\n      \"footer\": {\n        \"text\": \"Automated by n8n\",\n        \"icon_url\": \"https://n8n.io/favicon.ico\"\n      },\n      \"timestamp\": \"{{ $now.toISOString() }}\"\n    }\n  ]\n}",
        "options": {}
      },
      "id": "discord-embed-001",
      "name": "Send Discord Rich Embed",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        368,
        400
      ]
    }
  ],
  "connections": {},
  "pinData": {}
}
[
  {
    "id": "a7aab3da-9f52-4143-acd4-d8655207f74d",
    "meta": {
      "name": "API Call Node",
      "id": "api-call",
      "icon": {
        "svg": "",
        "type": "SVG"
      },
      "description": "## ๐ŸŽฎ POST Rich Embed Message to Discord  Creates beautifully formatted Discord embed messages with thumbnails, fields, and custom styling."
    },
    "label": "Send Discord Rich Embed",
    "dependencies": {
      "node-fetch": "3.3.2"
    },
    "script": "import fetch from \"node-fetch\";\nexport default async function apiCall({\n    url,\n    method,\n    contentType,\n    authorization,\n    body,\n    shouldAwait,\n    queryParams,\n    customHeaders\n}: NodeInputs, {\n    logging\n}: NodeScriptOptions) : NodeOutput  {\n    const headers = {\n        \"Content-Type\": contentType,\n        ...customHeaders\n    };\n    if (authorization) headers[\"Authorization\"] = authorization;\n\n    let queryParamsString = '';\n    if (queryParams) {\n        queryParamsString = '?' + new URLSearchParams(queryParams).toString();\n    }\n\n    const fetchOptions = {\n        method,\n        headers\n    };\n\n    if (method !== 'GET') {\n        fetchOptions.body = JSON.stringify(body);\n    }\n\n    const fetchPromise = fetch(url + queryParamsString, fetchOptions);\n\n    if (!shouldAwait) {\n        return {\n            data: null\n        };\n    }\n\n    const response = await fetchPromise;\n    const data = await response.json();\n    return {\n        status: response.status,\n        data\n    };\n}",
    "inputs": {
      "properties": {
        "method": {
          "type": "string",
          "description": "The HTTP method to use for the API call",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "DELETE",
            "PATCH"
          ],
          "default": "POST",
          "title": "HTTP Method",
          "buildship": {
            "options": [
              {
                "label": "GET",
                "value": "GET"
              },
              {
                "value": "POST",
                "label": "POST"
              },
              {
                "value": "PUT",
                "label": "PUT"
              },
              {
                "label": "DELETE",
                "value": "DELETE"
              },
              {
                "label": "PATCH",
                "value": "PATCH"
              }
            ],
            "index": 0,
            "sensitive": false
          }
        },
        "url": {
          "description": "The URL of the API endpoint",
          "title": "URL",
          "type": "string",
          "buildship": {
            "index": 1
          }
        },
        "authorization": {
          "description": "The authorization header for the API call, if required (e.g., Bearer or Basic token)",
          "type": "string",
          "title": "Authorization",
          "buildship": {
            "sensitive": true,
            "index": 2
          }
        },
        "queryParams": {
          "default": {},
          "description": "The query parameters for the API call",
          "type": "object",
          "title": "Query Parameters",
          "buildship": {
            "index": 3,
            "sensitive": false
          }
        },
        "body": {
          "type": "object",
          "buildship": {
            "index": 4
          },
          "description": "The body to send with the API call",
          "title": "Body"
        },
        "contentType": {
          "enum": [
            "application/json",
            "application/x-www-form-urlencoded",
            "multipart/form-data",
            "text/plain"
          ],
          "description": "The content type of the API call",
          "title": "Content Type",
          "buildship": {
            "index": 5,
            "options": [
              {
                "label": "application/json",
                "value": "application/json"
              },
              {
                "value": "application/x-www-form-urlencoded",
                "label": "application/x-www-form-urlencoded"
              },
              {
                "label": "multipart/form-data",
                "value": "multipart/form-data"
              },
              {
                "label": "text/plain",
                "value": "text/plain"
              }
            ]
          },
          "type": "string"
        },
        "shouldAwait": {
          "description": "Whether to wait for the request to complete or not",
          "title": "Await?",
          "type": "boolean",
          "buildship": {
            "sensitive": false,
            "index": 6
          }
        },
        "customHeaders": {
          "type": "object",
          "description": "Additional custom headers for the API call",
          "title": "Custom Headers",
          "buildship": {
            "index": 7,
            "sensitive": false
          }
        }
      },
      "type": "object",
      "required": [
        "url",
        "shouldAwait",
        "method"
      ]
    },
    "integrations": [],
    "name": "API Call Node",
    "output": {
      "buildship": {},
      "properties": {
        "status": {
          "buildship": {
            "index": 0
          },
          "type": "number",
          "description": "The HTTP status of the API response",
          "title": "Status"
        },
        "data": {
          "buildship": {
            "index": 1
          },
          "title": "Data",
          "type": "object",
          "description": "The data object from the API response"
        }
      },
      "type": "object"
    },
    "isCollapsed": false,
    "type": "script",
    "values": {
      "method": "POST",
      "url": {
        "_$expression_": "`${ctx?.[\"root\"]?.[\"inputs\"]?.[\"body\"].webhookUrl}`",
        "type": "javascript",
        "hasErrors": false
      },
      "authorization": null,
      "queryParams": {},
      "body": {
        "_$expression_": "{\n  \"embeds\": [\n    {\n      \"title\": ctx?.[\"root\"]?.[\"inputs\"]?.[\"body\"].title,\n      \"description\": ctx?.[\"root\"]?.[\"inputs\"]?.[\"body\"].description,\n      \"color\": {{ $json.color || 5814783 }},\n      \"fields\": [\n        {\n          \"name\": \"Status\",\n          \"value\": ctx?.[\"root\"]?.[\"inputs\"]?.[\"body\"].status,\n          \"inline\": true\n        },\n        {\n          \"name\": \"Updated\",\n          \"value\": ctx?.[\"root\"]?.[\"inputs\"]?.[\"body\"].timestamp,\n          \"inline\": true\n        }\n      ],\n      \"thumbnail\": {\n        \"url\": \"{{ $json.thumbnailUrl || '' }}\"\n      },\n      \"footer\": {\n        \"text\": \"Automated by n8n\",\n        \"icon_url\": \"https://n8n.io/favicon.ico\"\n      },\n      \"timestamp\": \"{{ $now.toISOString() }}\"\n    }\n  ]\n}",
        "type": "javascript",
        "hasErrors": false
      },
      "contentType": "application/json",
      "shouldAwait": true,
      "customHeaders": {}
    }
  }
]
{
  "subflows": [
    {
      "flow": [
        {
          "id": 147,
          "module": "http:ActionSendDataBasicAuth",
          "version": 3,
          "parameters": {
            "key": "ANONYMIZED_CREDENTIALS",
            "handleErrors": false,
            "useNewZLibDeCompress": true
          },
          "mapper": {
            "ca": "",
            "qs": [],
            "url": "{{1.webhookUrl}}",
            "data": "{\n  \"embeds\": [\n    {\n      \"title\": {{1.title}},\n      \"description\": {{1.description}},\n      \"color\": {{ $json.color || 5814783 }},\n      \"fields\": [\n        {\n          \"name\": \"Status\",\n          \"value\": {{1.status}},\n          \"inline\": true\n        },\n        {\n          \"name\": \"Updated\",\n          \"value\": {{1.timestamp}},\n          \"inline\": true\n        }\n      ],\n      \"thumbnail\": {\n        \"url\": \"{{ $json.thumbnailUrl || '' }}\"\n      },\n      \"footer\": {\n        \"text\": \"Automated by n8n\",\n        \"icon_url\": \"https://n8n.io/favicon.ico\"\n      },\n      \"timestamp\": \"{{ $now.toISOString() }}\"\n    }\n  ]\n}",
            "gzip": true,
            "method": "post",
            "headers": [],
            "timeout": "",
            "useMtls": false,
            "bodyType": "raw",
            "contentType": "application/json",
            "serializeUrl": false,
            "shareCookies": false,
            "parseResponse": true,
            "followRedirect": true,
            "useQuerystring": false,
            "followAllRedirects": false,
            "rejectUnauthorized": true
          },
          "metadata": {
            "designer": {
              "x": 300,
              "y": 300,
              "name": "POST Rich Embed Message to Discord"
            },
            "restore": {
              "expect": {
                "qs": {
                  "mode": "chose",
                  "items": []
                },
                "method": {
                  "mode": "chose",
                  "label": "POST"
                },
                "headers": {
                  "mode": "chose",
                  "items": []
                },
                "bodyType": {
                  "label": "Raw"
                },
                "contentType": {
                  "label": "JSON (application/json)"
                }
              },
              "parameters": {
                "key": {
                  "label": "ANONYMIZED_CREDENTIALS"
                }
              }
            },
            "parameters": [
              {
                "name": "key",
                "type": "keychain:basicauth",
                "label": "Credentials",
                "required": true
              },
              {
                "name": "handleErrors",
                "type": "boolean",
                "label": "Evaluate all states as errors (except for 2xx and 3xx )",
                "required": true
              },
              {
                "name": "useNewZLibDeCompress",
                "type": "hidden"
              }
            ],
            "expect": [
              {
                "name": "url",
                "type": "url",
                "label": "URL",
                "required": true
              },
              {
                "name": "serializeUrl",
                "type": "boolean",
                "label": "Serialize URL",
                "required": true
              },
              {
                "name": "method",
                "type": "select",
                "label": "Method",
                "required": true,
                "validate": {
                  "enum": [
                    "get",
                    "head",
                    "post",
                    "put",
                    "patch",
                    "delete",
                    "options"
                  ]
                }
              },
              {
                "name": "headers",
                "spec": [
                  {
                    "name": "name",
                    "type": "text",
                    "label": "Name",
                    "required": true
                  },
                  {
                    "name": "value",
                    "type": "text",
                    "label": "Value"
                  }
                ],
                "type": "array",
                "label": "Headers"
              },
              {
                "name": "qs",
                "spec": [
                  {
                    "name": "name",
                    "type": "text",
                    "label": "Name",
                    "required": true
                  },
                  {
                    "name": "value",
                    "type": "text",
                    "label": "Value"
                  }
                ],
                "type": "array",
                "label": "Query String"
              },
              {
                "name": "bodyType",
                "type": "select",
                "label": "Body type",
                "validate": {
                  "enum": [
                    "raw",
                    "x_www_form_urlencoded",
                    "multipart_form_data"
                  ]
                }
              },
              {
                "name": "parseResponse",
                "type": "boolean",
                "label": "Parse response",
                "required": true
              },
              {
                "name": "contentType",
                "type": "select",
                "label": "Content type",
                "validate": {
                  "enum": [
                    "text/plain",
                    "application/json",
                    "application/xml",
                    "text/xml",
                    "text/html",
                    "custom"
                  ]
                }
              },
              {
                "name": "data",
                "type": "buffer",
                "label": "Request content"
              }
            ]
          }
        }
      ]
    }
  ],
  "metadata": {
    "version": 1
  }
}
โ† Browse all nodes