# Send Telegram Messages to more than one receiver

**URL:** <https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689>\
**Category:** General\
**Created:** [18 August 2020 12:35 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689 "2020-08-18T12:35:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![terminus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/terminus/32/38378_2.png) [@terminus](https://discourse.nodered.org/u/terminus)\
**Post date:** [18 August 2020 12:35 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689/1 "2020-08-18T12:35:40Z")

</div>

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:

```auto
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

---

<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:** [18 August 2020 22:03 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689/2 "2020-08-18T22:03:29Z")

</div>

You need to send an array of chat id's

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

return msg;

```

---

<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:** [18 August 2020 23:22 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689/3 "2020-08-18T23:22:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![terminus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/terminus/32/38378_2.png) [@terminus](https://discourse.nodered.org/u/terminus)\
**Post date:** [20 August 2020 12:10 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689/4 "2020-08-20T12:10:32Z")

</div>

> [@E1cid](#):
>
> `['mychatid', 'secondchatid']`

That'S it! Thank you very much!!

---

<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:** [3 September 2020 12:10 UTC](https://discourse.nodered.org/t/send-telegram-messages-to-more-than-one-receiver/31689/5 "2020-09-03T12:10:37Z")

</div>

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