N8n telegram set webhook

hello everyone, I use setWebHook and a link from the n8n(test) trigger telegram node, tell me how to set up the js code of my bot with this webhook. Now it gives an error

{“code”:“ETELEGRAM”,“message”:“ETELEGRAM: 409 Conflict: terminated by other long poll or webhook”}

1 Like

Hi @FIRE_TIKTOK

I don’t understand why you set Webhook and need js code for bot.

All you need is Telegram Trigger + Telegram Node for creating a bot.

Please share your use case on what you’re trying to achieve also, if you have a workflow please share it here.

1 Like

I’m sorry, maybe I put it wrong, I have a bot written in nodejs and I’m trying to integrate it into n8n, it doesn’t work through polling: true, as I understand it, I need a webhook

1 Like

ETELEGRAM: 409 happens when there are multiple telegram trigger listeners waiting for the same getUpdates trigger. In that case. What you can do is. Delete the trigger inside the n8n and send a post request to the webhook node URL from the nodejs script. I can’t explain further without knowing what you’re trying to achieve.

2 Likes

all I need, as you correctly wrote, is for the nodejs bot to work with n8n, then I will associate the process with notion, but there is no problem

1 Like

I understand correctly that in order for nodejs to work with n8n, I don’t need a telegram triger at all? only need node telegram? thanks in advance

1 Like

Here is what I meant.

Workflow will be like this.

Webhook Node → Other Nodes like Notion and all
→ Telegram Node (If you want to send a text)

Get the Webhook URL and send a post request from the Nodejs script. It gives the data to n8n workflow. The process that with n8n.

Hope you understand.

2 Likes

thanks a lot, can i use this url for aebhook?

1 Like