# Array data to telegram

**URL:** <https://discourse.nodered.org/t/array-data-to-telegram/31936>\
**Category:** General\
**Created:** [24 August 2020 09:21 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936 "2020-08-24T09:21:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romprod](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Romprod](https://discourse.nodered.org/u/Romprod)\
**Post date:** [24 August 2020 09:21 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/1 "2020-08-24T09:21:15Z")

</div>

Hi,

I'm trying to understand how I get data from an array into Telegram Notify node. I'd like to include all three parts of the array, one on each line.

I've read and re-read the guides on here but I'm not able to understand where I go from here (noob)

Apologies if this post isn't in the correct location etc.

[flows.json](https://discourse.nodered.org/uploads/short-url/ldlfF1MZXAoFFpq1rJuGt9uVQSG.json) (3.8 KB)

```auto
 [{"id":"18d2a40e.69977c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a923a71f.23b0e8","type":"change","z":"18d2a40e.69977c","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Goal! ","fromt":"str","to":"Goal,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Half-time. ","fromt":"str","to":"Half-time,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Finished. ","fromt":"str","to":"Finished,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Red card! ","fromt":"str","to":"Red card,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":0 ","fromt":"str","to":":0","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":1 ","fromt":"str","to":":1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":2 ","fromt":"str","to":":2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":3 ","fromt":"str","to":":3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":4 ","fromt":"str","to":":4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":5 ","fromt":"str","to":":5","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":6 ","fromt":"str","to":":6","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":7 ","fromt":"str","to":":7","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":8 ","fromt":"str","to":":8","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":9 ","fromt":"str","to":":9","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":":10 ","fromt":"str","to":":10","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":". ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"] ","fromt":"str","to":"]","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":140,"wires":[["9bbd6fce.f5668"]]},{"id":"ba0a8018.3dad2","type":"debug","z":"18d2a40e.69977c","name":"Step 1","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":260,"y":260,"wires":[]},{"id":"9c91e38e.6249","type":"inject","z":"18d2a40e.69977c","name":"Trigger","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"Goal! Fred - Bob 0:[1] ,35' Jeff T. ","payloadType":"str","x":120,"y":140,"wires":[["a923a71f.23b0e8"]]},{"id":"9bbd6fce.f5668","type":"split","z":"18d2a40e.69977c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":260,"y":200,"wires":[["ba0a8018.3dad2","3f3ca270.e11e5e"]]},{"id":"3f3ca270.e11e5e","type":"join","z":"18d2a40e.69977c","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":500,"y":200,"wires":[["f5e52174.b079b","e790a2c6.17048"]]},{"id":"708a8ba8.a59e24","type":"debug","z":"18d2a40e.69977c","name":"Step 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":260,"wires":[]},{"id":"f5e52174.b079b","type":"function","z":"18d2a40e.69977c","name":"1","func":"msg.payload = msg.payload[0];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":200,"wires":[["708a8ba8.a59e24","d41ad78d.0a9f98"]]},{"id":"e790a2c6.17048","type":"debug","z":"18d2a40e.69977c","name":"Step 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":500,"y":260,"wires":[]},{"id":"d41ad78d.0a9f98","type":"telegrambot-notify","z":"18d2a40e.69977c","name":"","bot":"","chatId":"","message":"","parseMode":"","x":910,"y":200,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Romprod](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Romprod](https://discourse.nodered.org/u/Romprod)\
**Post date:** [29 August 2020 06:00 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/2 "2020-08-29T06:00:06Z")

</div>

Can anyone give me an example of how to use data from an array to send it across to a TelegramNotify node pls?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 August 2020 06:30 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/3 "2020-08-29T06:30:57Z")

</div>

Are you able to send a normal string? Where is it you think the problem is?

---

<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:** [29 August 2020 20:01 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/4 "2020-08-29T20:01:21Z")

</div>

> [@Romprod](#):
>
> Telegram Notify node

Can you please also tell us what actual Node you are using? It will be node-red-contrib-xxxxx

There are 2 main Nodes for Telegram and they both work somewhat differently from each other.

---

<div class="post-metadata">

**Author:** ![Romprod](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Romprod](https://discourse.nodered.org/u/Romprod)\
**Post date:** [9 October 2020 13:05 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/5 "2020-10-09T13:05:37Z")

</div>

I'm using node-red-contrib-telegrambot-home as can be seen below

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/545176114813fd4e4e5857d1b95d8f28876b59ac.png)

What I'm trying to achieve is this.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a34b0007d2a580833fdd35368a1a53a9f526a2fa.png)

But what I'm getting is this.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bbd2abdac1e9cb9c7f74be3d59d481c51b793df7.png)

---

<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:** [9 October 2020 16:24 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/6 "2020-10-09T16:24:02Z")

</div>

Is there a example of your array?

---

<div class="post-metadata">

**Author:** ![Romprod](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Romprod](https://discourse.nodered.org/u/Romprod)\
**Post date:** [10 October 2020 18:31 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/7 "2020-10-10T18:31:41Z")

</div>

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

I'll be the first to admit, I'm in way over my head here. I've no idea if I'm even doing this the right way around.

---

<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:** [10 October 2020 20:09 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/8 "2020-10-10T20:09:11Z")

</div>

Use a templete node set out like -

```auto
{{payload.0}}
{{payload.1}} {{payload.2}}
{{payload.3}}

```

---

<div class="post-metadata">

**Author:** ![Romprod](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Romprod](https://discourse.nodered.org/u/Romprod)\
**Post date:** [12 October 2020 11:06 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/9 "2020-10-12T11:06:06Z")

</div>

Perfect thankyou, that's exactly what I needed.

---

<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:** [26 October 2020 11:06 UTC](https://discourse.nodered.org/t/array-data-to-telegram/31936/10 "2020-10-26T11:06:07Z")

</div>

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