# Node Red into Telegram Bot into Telegram Chanel

**URL:** <https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826>\
**Category:** General\
**Created:** [1 March 2021 15:30 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826 "2021-03-01T15:30:00Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [1 March 2021 15:30 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/1 "2021-03-01T15:30:00Z")

</div>

Hello  
i have a Node Red script sending Information to my Telegram Bot!  
This Part works fine.

to be able for more reader of the Bot information i had to create a Chanel.  
I did so and also added my Bot as Admin into the Chanel!

should now the information which is send into my Telegram Bot not be shown also in the Telegram Chanel?

have a nice day  
vinc  
PS i know has not much to do with Node-Red but till now get the most valuable Information here 😉

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [1 March 2021 20:41 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/2 "2021-03-01T20:41:44Z")

</div>

Are you sending to the channel's ID? I think that the id's for users are positive and for groups are negative.

I have MQTT topics set up that let me send to people and groups by name, a flow listens for the topics and has a function node that translates the topic into the right id and formats the output.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [2 March 2021 09:03 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/3 "2021-03-02T09:03:03Z")

</div>

Hello @TotallyInformation  
no Node Red is sending to a Bot.  
i created a chanel and added the bot as admin with the right to send news, all other option are switched off only "Nachrichten senden" is switched on

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 March 2021 12:50 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/4 "2021-03-02T12:50:06Z")

</div>

You don't actually send to a bot. The bot sends to either a person or a group.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [2 March 2021 13:33 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/5 "2021-03-02T13:33:06Z")

</div>

my node-red send the information to my Telegram Bot! i think not to a person or group 🤔  
the content is  
msg id, type and the content itself and there for i had to create the Bot! just this part works! 😃

> **[node-red-contrib-telegrambot](https://flows.nodered.org/node/node-red-contrib-telegrambot)**
>
> Telegram bot nodes for Node-RED

the Problem i have is to bring the Information which arrive into the Bot to also be published to the channel

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [2 March 2021 16:32 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/6 "2021-03-02T16:32:14Z")

</div>

and the node doing the telegram information is there

```auto
[{"id":"3a61bbb6.f4ba34","type":"function","z":"7b0f05c9.c8224c","name":"","func":"var message = 'Test Message';\nvar payload = msg.payload.text ;\nvar payloadl = msg.payload.author;\n\nmsg.payload = {chatId : 123456789 , type : 'message', \ncontent : \"*\" +message +\"*\" +\"\\n\" +\"\\n\" +payload +\"\\n\" +\"\\n\" +\"*\" +payloadl +\"*\"\n};\n\n// activate markdown\n//msg.payload.options = {disable_web_page_preview : true, parse_mode :\"Markdown\"};\nmsg.payload.options = {disable_web_page_preview : true, parse_mode :\"Markdown\"};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":1000,"wires":[["9ad8cb5b.5c2478"]]}]

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 March 2021 21:46 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/7 "2021-03-02T21:46:44Z")

</div>

> [@vikozo](#):
>
> the Problem i have is to bring the Information which arrive into the Bot to also be published to the channel

I will say it one more time. You have to set a property called the `chatId` as indicated in the node's documentation. Group chatId's are a negative number, individual user id's are positive.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [3 March 2021 06:41 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/8 "2021-03-03T06:41:27Z")

</div>

@TotallyInformation Merci  
so i will have to find out how to get the Privat Channel ID!  
have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 March 2021 07:23 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/9 "2021-03-03T07:23:55Z")

</div>

Use a debug node set to show full message, connected to the telegram nodes that receives your group chat messages - the chatId will be in there.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [3 March 2021 17:48 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/10 "2021-03-03T17:48:11Z")

</div>

@Steve-Mcl Merci  
how to this connection i dont have a token for the Channel.  
And I asked for the Channel not the Group or Bot.  
In Telegram itself the Bot is administator to the Channel but not publishing into the channel. what should work

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 March 2021 20:30 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/11 "2021-03-03T20:30:10Z")

</div>

I think that the channel ID is shown in the configuration of the channel if you are the owner.

Personal ID's can also be obtained from a bot provided by Telegram themselves - ID Bot? Can't quite remember.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [3 March 2021 20:55 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/12 "2021-03-03T20:55:12Z")

</div>

Bot Token  
BOt chat id all OK  
Channel ID cant get it  
but maybe it is just not working....

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 March 2021 21:30 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/13 "2021-03-03T21:30:15Z")

</div>

Drat, Telegram has changed their web UI and the old methods don't seem to work any more.

I think that you have to attach the bot to a group. If the bot has access to all posts, set up a flow to listen for all inputs and output to debug. The id is in the incoming msg.

If the bot is restricted, set up a / command for the bot. In NR, set up a command listener and then issue that command in the channel, again, the id is in the incoming msg.

I have about 1/2 dozen bots and a similar number of groups and they all work just fine.

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [3 April 2021 13:42 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/14 "2021-04-03T13:42:15Z")

</div>

There is one thing to know:  
Bot features are limited when it is a member of a channel. Even if it is an administrator it is not allowed to do everything just like in a group or supergroup.  
I did not know this for a while and wondered about all the problems people have with bots in channels....

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [6 April 2021 06:26 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/15 "2021-04-06T06:26:41Z")

</div>

Thanks for your feedback.  
yes i think it is strange a Bot can't publish into a channel.  
And not easy to find out the channel id to publish into. 😉  
have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 June 2021 06:27 UTC](https://discourse.nodered.org/t/node-red-into-telegram-bot-into-telegram-chanel/41826/16 "2021-06-05T06:27:13Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
