# Telegram Bot/Notifications

**URL:** <https://discourse.nodered.org/t/telegram-bot-notifications/76504>\
**Category:** General\
**Created:** [13 March 2023 09:53 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504 "2023-03-13T09:53:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samokomo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/samokomo/32/63918_2.png) [@Samokomo](https://discourse.nodered.org/u/Samokomo)\
**Post date:** [13 March 2023 09:53 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/1 "2023-03-13T09:53:53Z")

</div>

Hello guys,

I want to use telegram messages in my projects, as I see it as easy and free way to recieve updates on my phone.There is a catch tho.

I downloaded node-red-contrib-telegrambot (15.0.1) Created bot via @BotFather on Telegram.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/9319a5aa44152ec184a8f0b2fe78674d30ccdf02.png)  
I stared a chat with my new bot, so I cloud get a chatID via api/getResponse.  
Than, after setting up my node, I an getting and error: "TypeError: Cannot read properties of null (reading 'botname')".  
My config clearle contains botname, in this case SKOiotBot. The same thing happens if I create a different bot. Any tips?  
Config info:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b967db5cfbe2ece3781ae5c803f9580e4f22b5e.png)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 March 2023 12:26 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/2 "2023-03-13T12:26:27Z")

</div>

Have you tried leaving the ChatIds box empty?  
On my setup I put a @sign at the start of the Bot-Name.  
e.g @SKOiotBot

By-the way...  
I would blank out your Token and ChatId in your image otherwise you may get swamped with messages.

---

<div class="post-metadata">

**Author:** ![Samokomo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/samokomo/32/63918_2.png) [@Samokomo](https://discourse.nodered.org/u/Samokomo)\
**Post date:** [13 March 2023 12:30 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/3 "2023-03-13T12:30:09Z")

</div>

Thanks for the tip, but I already tried those options but no change whatsoever. I dont mind getting this bot spammed as I will create a new one and I am not able to connect to this one anyway. But I get your point.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 March 2023 12:32 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/4 "2023-03-13T12:32:06Z")

</div>

OK, so have you tried restarting Node-RED and rebooting your Raspberry PI ??

It should look like this when the Bot connects.  
 ![connected](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/5/4527a98b60730be71ec2bdc3ee0bf412d8fc6619.png)

To isolate all the other parts of your flow, you could try placing the Telegram node on a flow (in a new tab) with nothing else there?  
Does it connect?  
You might need to disable the original Telegram node or even delete it (whilst you check things out).

---

<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:** [13 March 2023 13:18 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/5 "2023-03-13T13:18:03Z")

</div>

Try turning on verbose logging as well to see if you get any more data. I would certainly remove the chatids field until you have things working.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [13 March 2023 13:45 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/6 "2023-03-13T13:45:08Z")

</div>

My chatid's start with a `-`

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 March 2023 15:36 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/7 "2023-03-13T15:36:31Z")

</div>

I've created a small test-flow...  
 ![bot_flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/1823d592445c52015c9c4cedb6972eceead63f1f.png)

When I painstakenly enter your bot token I get this error message.

![bot_token](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/3/63e17daf00467a7ec7f77705a6ed6a899d246fd5.png)

I suggest you ask the Bot Father for the token again.

---

<div class="post-metadata">

**Author:** ![Samokomo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/samokomo/32/63918_2.png) [@Samokomo](https://discourse.nodered.org/u/Samokomo)\
**Post date:** [16 March 2023 09:52 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/8 "2023-03-16T09:52:33Z")

</div>

Thanks for all your ideas. I have this NodeRed instance running on cloud, so I redeployed it and removed the chatIds and it is working now. 🙌

---

<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:** [30 March 2023 09:52 UTC](https://discourse.nodered.org/t/telegram-bot-notifications/76504/9 "2023-03-30T09:52:52Z")

</div>

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