How to send a message to telegram user from node-red if it's not a reply to a previous message sent by the user? (I am using telegram bot as a chatbot with users)
Asked
Active
Viewed 2,285 times
1 Answers
0
The main thing in sending a telegram message from Node-Red is you need a way to capture every user 'Telegram ID'. There is already a nice tutorial about sending messages on iotwithus.
The short story is you will need a Function node before Telegram sender node that will contain:
msg.payload = {}
msg.payload.chatId = your-id-here
msg.payload.type = ‘message’
msg.payload.content = ‘hello from node-red!’
return msg;
Keep in mind to save your users Telegram ID as an integer, not a string, as you can see, we set payload.chatID without the quotes.

Nemanja
- 174
- 17