Telegram Trigger: Bad Request

Describe the issue/error/question

n8n+traefik
after adding the “telegram-trigger” block and adding the API token there, when I click on the listen for event button, I get an error:

What is the error message (if any)?

2022-07-28T09:52:42.394Z | debug | Request proxied to Axios failed “{\n error: Error: Request failed with status code 400\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/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:1345:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21) {\n config: {\n url: ‘https://api.telegram.org/bot5499333286:AAFz770zT-x0U_TWqbAPJRrWIvoPLtOK_ps/setWebhook’,\n method: ‘post’,\n data: '{"url":"https://n8n.local.domain.com/webhook-test/d9c25bf8-9599-43a6-94d0-04e367aaf175/webhook\",\“allowed_updates\”:[\"message\”]}',\n headers: [Object],\n transformRequest: [Array],\n transformResponse: [Array],\n paramsSerializer: [Function (anonymous)],\n timeout: 300000,\n adapter: [Function: httpAdapter],\n xsrfCookieName: ‘XSRF-TOKEN’,\n xsrfHeaderName: ‘X-XSRF-TOKEN’,\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n validateStatus: [Function: validateStatus],\n transitional: [Object],\n ‘axios-retry’: [Object]\n },\n request: ClientRequest {\n _events: [Object: null prototype],\n _eventsCount: 7,\n _maxListeners: undefined,\n outputData: [],\n outputSize: 0,\n writable: true,\n destroyed: false,\n _last: true,\n chunkedEncoding: false,\n shouldKeepAlive: false,\n maxRequestsOnConnectionReached: false,\n _defaultKeepAlive: true,\n useChunkedEncodingByDefault: true,\n sendDate: false,\n _removedConnection: false,\n _removedContLen: false,\n _removedTE: false,\n _contentLength: null,\n _hasBody: true,\n _trailer: ‘’,\n finished: true,\n _headerSent: true,\n _closed: false,\n socket: [TLSSocket],\n _header: ‘POST /bot5499333286:AAFz770zT-x0U_TWqbAPJRrWIvoPLtOK_ps/setWebhook HTTP/1.1\r\n’ +\n ‘Accept: application/json\r\n’ +\n ‘Content-Type: application/json\r\n’ +\n ‘User-Agent: axios/0.21.4\r\n’ +\n ‘Content-Length: 127\r\n’ +\n ‘Host: api.telegram.org\r\n’ +\n ‘Connection: close\r\n’ +\n ‘\r\n’,\n _keepAliveTimeout: 0,\n _onPendingData: [Function: nop],\n agent: [Agent],\n socketPath: undefined,\n method: ‘POST’,\n maxHeaderSize: undefined,\n insecureHTTPParser: undefined,\n path: ‘/bot5499333286:AAFz770zT-x0U_TWqbAPJRrWIvoPLtOK_ps/setWebhook’,\n _ended: true,\n res: [IncomingMessage],\n aborted: false,\n timeoutCb: null,\n upgradeOrConnect: false,\n parser: null,\n maxHeadersCount: null,\n reusedSocket: false,\n host: ‘api.telegram.org’,\n protocol: ‘https:’,\n _redirectable: [Writable],\n [Symbol(kCapture)]: false,\n [Symbol(kNeedDrain)]: false,\n [Symbol(corked)]: 0,\n [Symbol(kOutHeaders)]: [Object: null prototype]\n },\n response: {\n status: 400,\n statusText: ‘Bad Request’,\n headers: [Object],\n config: [Object],\n request: [ClientRequest],\n data: [Object]\n },\n isAxiosError: true,\n toJSON: [Function: toJSON]\n },\n file: ‘NodeExecuteFunctions.js’\n}"

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

{
“nodes”: [
{
“parameters”: {
“updates”: [
“message”
],
“additionalFields”: {}
},
“name”: “Telegram Trigger”,
“type”: “n8n-nodes-base.telegramTrigger”,
“typeVersion”: 1,
“position”: [
-240,
180
],
“webhookId”: “d9c25bf8-9599-43a6-94d0-04e367aaf175”,
“credentials”: {
“telegramApi”: {
“id”: “1”,
“name”: “Telegram API key”
}
}
}
],
“connections”: {}
}

Share the output returned by the last node

Telegram Trigger: Bad Request: bad webhook: Failed to resolve host: Name or service not known

Information on your n8n setup

  • n8n version: 0.188.0
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: default
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Hey @denq,

Welcome to the community :tada:

Assuming you don’t already have a Telegram trigger running for your bot, does your n8n instance need to go out through a proxy to get to the internet?

Hi,
Correct, trigger isn’t running. I just added it to workflow. I have no proxy in network.

Is it the only Telegram trigger for the bot you are using so no other applications using it?

i have the same problem