Node-red-contrib-telegrambot complains chatId is empty

Trying to send myself a file using Telegram and the 'telegram sender' node is always moaning about chatId being missing - am I doing this wrong?

[{"id":"f9da9fc7.b66e6","type":"telegram sender","z":"85dfd613.ecdcc8","name":"","bot":"44c1a3de.9f409c","x":240,"y":680,"wires":[["9c262076.ad095"]]},{"id":"67a739ee.445fb8","type":"function","z":"85dfd613.ecdcc8","name":"","func":"msg.payload.content = 'woo.jpeg';\nmsg.payload.type = 'photo';\nmsg.payload.chatId = 'xxx';\nreturn msg;","outputs":1,"noerr":0,"x":140,"y":620,"wires":[["f9da9fc7.b66e6"]]},{"id":"98576c7b.70abc","type":"inject","z":"85dfd613.ecdcc8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":80,"y":580,"wires":[["67a739ee.445fb8"]]},{"id":"9c262076.ad095","type":"debug","z":"85dfd613.ecdcc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":340,"y":760,"wires":[]},{"id":"44c1a3de.9f409c","type":"telegram bot","z":"","botname":"PBXBot","usernames":"pbx_bot","chatids":"xxx","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]

thanks

11/07/2020, 19:33:04[node: f9da9fc7.b66e6](http://192.168.194.2:1880/#)msg : string[27]

"msg.payload.chatId is empty"

(chatId obfusated above with xxx)

If you link the output from the function node to a debug node then you will see that the msg.payload is somehow not like you would expect it to be.

Rewrite it like:

I have the same problem, I have reinstalled Node, Node-Red, Telegram, Watson three times and I get the same error. I put the chatID number in both functions and it doesn't work. Telegram sends the message to Watson assist and it returns the chatbot's response well, but not the chatID.

I have checked the programming of the two functions in two different web pages, one from IBM, and they are the same. I use Node-RED locally, but they do it from the IBM Cloud, can the problem come here?

Hi @Carbar your post doesnt make a whole lot of sense if I am honest.

Perhaps you should start a new thread, and post screen shots of your flow & debug messages & your flow - describing what you are doing and what you are seeing.

Your chat id could be empty for several reasons but unless we can see your flow and code, we would only be guessing.

See that in the functions you don't have chatID instead of chatId. I've had the same problem.

you need to add -100 at in front of your chatId then you'll be able the bot to send the message

-100??
Minus indicates that it is a group or a channel instead of a single user.

a group that been upgraded to supergroup