Send Telegram Messages to more than one receiver

As you might already thinking, I'm a total noob. I'm trying to get NodeRed to send a Notification to more than on Telegram ID. So I set up a function Node like this:

msg.payload = {
    title : 'Türchen geöffnet',
    content : 'Post ist da!',
    type : 'message',
    chatId : 'mychatid,secondchatid',
};

return msg;

But Telegram takes always only the first ID, and I don't get it to work. Someone has a hint for me? Or is it necessary to make a single function for every recipient?

Thank you in advance!
Term

1 Like

You need to send an array of chat id's

msg.payload = {
    title : 'Türchen geöffnet',
    content : 'Post ist da!',
    type : 'message',
    chatId : ['mychatid', 'secondchatid']
};

return msg;
5 Likes

Or maybe set up a group that all of the users subscribe to along with the bot.

3 Likes

That'S it! Thank you very much!!

1 Like

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