Discord error

Hey,

I have workflow what push to discord new posts to discord and push bullet. Sometimes I got an error like following:

ERROR:UNKNOWN ERROR - check the detailed error for more information
400 - {"embeds":["0"]}

In this specific execute, I sent this object to discord webhook:

[
  "Object":{
    "username":"Tim",
    "avatar_url":"https://community.n8n.io/user_avatar/community.n8n.io/timstockford/45/6008_2.png",
    "embeds":[
      {
        "author":{
          "name":"Zendesk Trigger node error DeprecatedTargetType",
          "url":"https://community.n8n.io/t/zendesk-trigger-node-error-deprecatedtargettype/11753/1"
        },
        "description":"Describe the issue/error/question\nGet error when running Zendesk Trigger node on my newly setup n8n instance (running in Azure).  The api credentials work if I use a Zendesk node to query tickets.\nAlso noticed this message in Zendesk → API → Target Failures:\nWhat is the error message (if any)?\nERROR RESPONSE\nNodeApiError: Forbidden - perhaps check your credentials?\n    at Object.zendeskApiRequest (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Zendesk/GenericFunctions.js:43:15)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Object.create (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Zendesk/ZendeskTrigger.node.js:361:38)\n    at async ActiveWebhooks.add (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/n8n-core/dist/src/ActiveWebhooks.js:32:17)\n    at async TestWebhooks.needsWebhookData (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/dist/src/TestWebhooks.js:97:17)\n    at async /home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/dist/src/Server.js:526:38\n    at async /home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/dist/src/ResponseHelper.js:89:26 {\n  cause: Error: Request failed with status code 403\n      at createError (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n      at settle (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n      at IncomingMessage.handleStreamEnd (/home/azureuser/.nvm/versions/node/v17.6.0/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n      at IncomingMessage.emit (node:events:539:35)\n      at IncomingMessage.emit (node:domain:475:12)\n      at endReadableNT (node:internal/streams/readable:1342:12)\n      at processTicksAndRejections (node:internal/process/task_queues:83:21) {\n    config: undefined,\n    request: undefined,\n    response: {\n      status: 403,\n      statusText: 'Forbidden',\n      headers: [Object],\n      config: [Object],\n      request: [ClientRequest],\n      data: [Object]\n    },\n    isAxiosError: true,\n    toJSON: [Function: toJSON],\n    cause: {},\n    error: {\n      error: 'DeprecatedTargetType',\n      description: 'Deprecated target type'\n    },\n    statusCode: 403,\n    options: {\n      url: 'https://coremonthelp.zendesk.com/api/v2/targets.json',\n      method: 'post',\n      data: '{\"target\":{\"title\":\"n8n webhook\",\"type\":\"http_target\",\"target_url\":\"https://n8n-tdsmsdn.northeurope.cloudapp.azure.com:5678/webhook-test/85060ea7-23a8-4545-8f54-31544ac63045/webhook\",\"method\":\"POST\",\"active\":true,\"content_type\":\"application/json\"}}',\n      headers: [Object],\n      transformRequest: undefined,\n      transformResponse: undefined,\n      paramsSerializer: undefined,\n      timeout: 300000,\n      adapter: undefined,\n      xsrfCookieName: 'XSRF-TOKEN',\n      xsrfHeaderName: 'X-XSRF-TOKEN',\n      maxContentLength: -1,\n      maxBodyLength: -1,\n      validateStatus: undefined,\n      transitional: [Object],\n      'axios-retry': [Object],\n      httpsAgent: undefined\n    }\n  },\n  node: {\n    parameters: {\n      authentication: 'apiToken',\n      service: 'support',\n      options: [Object],\n      conditions: [Object]\n    },\n    name: 'Zendesk Trigger',\n    type: 'n8n-nodes-base.zendeskTrigger',\n    typeVersion: 1,\n    position: [ 460, 300 ],\n    webhookId: '85060ea7-23a8-4545-8f54-31544ac63045',\n    credentials: { zendeskApi: [Object] }\n  },\n  timestamp: 1645975914864,\n  httpCode: '403',\n  description: 'DeprecatedTargetType'\n}\n\nPlease share the workflow\n{\n  \"nodes\": [\n    {\n      \"parameters\": {},\n      \"name\": \"Start\",\n      \"type\": \"n8n-nodes-base.start\",\n      \"typeVersion\": 1,\n      \"position\": [\n        240,\n        300\n      ],\n      \"disabled\": true\n    },\n    {\n      \"parameters\": {\n        \"options\": {\n          \"fields\": [\n            \"ticket.id\",\n            \"ticket.title\",\n            \"ticket.url\"\n          ]\n        },\n        \"conditions\": {\n          \"any\": [\n            {},\n            {\n              \"value\": \"new\"\n            }\n          ]\n        }\n      },\n      \"name\": \"Zendesk Trigger\",\n      \"type\": \"n8n-nodes-base.zendeskTrigger\",\n      \"typeVersion\": 1,\n      \"position\": [\n        460,\n        300\n      ],\n      \"webhookId\": \"85060ea7-23a8-4545-8f54-31544ac63045\",\n      \"credentials\": {\n        \"zendeskApi\": {\n          \"id\": \"1\",\n          \"name\": \"Zendesk CoremontHelp Trial\"\n        }\n      }\n    }\n  ],\n  \"connections\": {}\n}\n\nShare the output returned by the last node\nNo output returned, just error.\nInformation on your n8n setup\n**n8n version:**0.164.1\n**Database you’re using (default: SQLite):**default\n**Running n8n with the execution process [own(default), main]:**default\n**Running n8n via [Docker, npm, n8n.cloud, desktop app]:**npm & n8n.cloud"
      }
    ]
  }
]

Here is workflow:

Is anyone has some idea what is problem for discord?

Hey @Shirobachi, it looks like you’re using the HTTP Request node here, so the 400 response comes from Discord suggesting their API doesn’t like what you are sending.

So this might be a question for the Discord community rather than the n8n one. When shortening the description field content, the request was working fine for me, so maybe there simply is a maximum length or characters not supported by Discord in there?

1 Like

Oh, you’re right of course, here are limits for future users :wink:

1 Like