Is it possible to use the telegram node to post to a (my own) telegram channel?

I tried to use the telegram node to use a telegram bot to send a message to a telegram channel where the bot is an admin.

I have both the chat ID and the name of the channel starting with @

Nothing I have tried so far seems to work.
(neither using the chat ID I got by adding the @username_to_id_bot bot as a member to the channel nor using the channel name itself)
I’ve tried a couple other stupid things not worth mentioning. :slight_smile:

it gives this error:

"message": "400 - {"ok":false,"error_code":400,"description":"Bad Request: chat not found"}",

"name": "Error",

"stack": "Error: Request failed with status code 400 at createError

I can get the same n8n node to send a message to a chat I have going between me and the bot. But I can’t get it to send an update to the channel by changing over to its ID. I’m wondering if maybe that’s just not supported? Or maybe I just THINK I have the chat ID for the channel, but I don’t really. :slight_smile:

Thanks to anybody very kindly for their time and help. :slight_smile:

1 Like

Hi @MJ_33

Can you try opening this URL in your Browser?

https://api.telegram.org/bot{bot_token}/sendMessage?chat_id={chat_id}&text=hello

Make sure to replace {bot_token} with your actual bot token and {chat_id} with your actual chat ID.

Please note that Chat ID of your Telegram Channel starts with a prefix of -100 something like this for example -1001367229836

If it’s working correctly then place the working chat ID in telegram node.

6 Likes

Thank you for the help. It gave me another thing to try at least. It turns out I had the right chat ID. But for SOME reason it won’t work without a minus sign in front of it. I wasn’t aware that needed to be included. Thank you for the help! :smile:

3 Likes

For what it’s worth, when the channel is public, the @username_to_channel works well in place of the chat ID. Also, n8n receives a response with the chat ID after sending a message using the channel’s username. So that’s another handy way to get the chat ID. Just make sure to include the @ symbol if you’re using the username. It is required :slight_smile:

I found the relevant section on this really long page, thanks to your help:
(and that’s where I found mention of the channel name as an alternative)

2 Likes

Good to know. Glad it helps.

Enjoy :tada:

1 Like

For anyone else who may run in to difficulty with this, a particular stackoverflow discussion (linked below) was also helpful to me for finding the chat ID of the channel (before I made it public, etc.)

The easiest way I found was from this suggestion:

Found another one easiest way : Just send to @username_to_id_bot (Telegram: Contact @username_to_id_bot) bot your invite link to your private channel, it will return it’s ID . Simplest level : maximum! :slight_smile:

The suggestions about getting it from the address bar are also easy (and not dependent on a bot), only problem is that the new version of Telegram on the Web doesn’t have it in the address bar. But you can still get it from the legacy version: Telegram Web

You have to add the -100 (rincluding the minus sign) to the beginning of the partial ID in the address bar. See discussion for more details:

2 Likes

thanks for this haha

1 Like

Hi - I went. to have a look at that SO post and found this to be the easiest way:
In yr browser (or Postman) just do

https://api.telegram.org/bot<BOT_TOKEN>/getUpdates

You then get a reply - in there go after the section “chat” {“id”: [bingo!] …}

I had the same problem now in 2025. So, simply creating a channel and adding the bot as an admin is mandatory, but that didn’t work either. What did work was creating a group and adding the bot as a regular member. Then you try putting an ID like this (-4855830903) and it will work.

Then you can create a Channel if you want and add the bot.

But I think the main solution was this way:

I created the bot.

I clicked on the link suggested by BotFather to start the bot, because it seems that it’s mandatory to have a first interaction (a conversation) with it, clicking on Start when accessing the link suggested by BotFather, because then the bot has its first conversation as a message receiver.

Then, after that, you create the Group and add the bot as a regular member.

Take the numeric ID of the group and use it in the n8n node, and try sending a message.

Then you can even create a channel and add the bot as an admin, but I think you don’t even need to if you don’t want to. But in that case, the ID you’re going to use needs to have the @ symbol, okay!

I think the big secret is right in step 2 of this step-by-step guide.

I had the same problem now in 2025. So, simply creating a channel and adding the bot as an admin is mandatory, but that didn’t work either. What did work was creating a group and adding the bot as a regular member. Then you try putting an ID like this (-4855830903) and it will work.

Then you can create a Channel if you want and add the bot.

But I think the main solution was this way:

I created the bot.

I clicked on the link suggested by BotFather to start the bot, because it seems that it’s mandatory to have a first interaction (a conversation) with it, clicking on Start when accessing the link suggested by BotFather, because then the bot has its first conversation as a message receiver.

Then, after that, you create the Group and add the bot as a regular member.

Take the numeric ID of the group and use it in the n8n node, and try sending a message.

Then you can even create a channel and add the bot as an admin, but I think you don’t even need to if you don’t want to. But in that case, the ID you’re going to use needs to have the @ symbol, okay!

I think the big secret is right in step 2 of this step-by-step guide.