Array data to telegram

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 (3.8 KB)

 [{"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":[]}]

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

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

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.

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

image

What I'm trying to achieve is this.
image

But what I'm getting is this.
image

Is there a example of your array?

image

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.

Use a templete node set out like -

{{payload.0}}
{{payload.1}} {{payload.2}}
{{payload.3}}
1 Like

Perfect thankyou, that's exactly what I needed.

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