Generate x copies of a message

I'm working on splitting a retrieved image into tiles so I'm thinking of cropping it x times to do this.

But this means I need each incoming message to trigger sending x messages in a row for processing downstream.

I feel this is simple to do but I'm not coming up with anything so far

I can do with with Blockly but as always, I'm wanting to do it with core/contrib nodes :slight_smile:

Maybe something like this

[{"id":"4a9707e1946312fe","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":2080,"wires":[["84968c4d.2ce338"]]},{"id":"84968c4d.2ce338","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"hold","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"11111","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":2080,"wires":[["4ee9550.854c22c"]]},{"id":"4ee9550.854c22c","type":"split","z":"bf9e1e33.030598","name":"","splt":"1","spltType":"len","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":270,"y":2140,"wires":[["5c5c0d21.811a74"]]},{"id":"5c5c0d21.811a74","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"move","p":"hold","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":2140,"wires":[["948680af.a2fc58"]]},{"id":"948680af.a2fc58","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":2100,"wires":[]}]
1 Like

Very ingenious :slight_smile:

1 low-code and 1 no-code...

chrome_ucbJ4tOKRf

[{"id":"b5a7e07cf8b97ea8","type":"inject","z":"b4132d0e1950d012","name":"some trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"id\":1}","payloadType":"json","x":1330,"y":120,"wires":[["6d6b715dba32f783"]]},{"id":"6d6b715dba32f783","type":"change","z":"b4132d0e1950d012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[payload,payload,payload]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1510,"y":120,"wires":[["b457b25808a9973e"]]},{"id":"4fe73ad577dc2cfc","type":"debug","z":"b4132d0e1950d012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1830,"y":120,"wires":[]},{"id":"b457b25808a9973e","type":"split","z":"b4132d0e1950d012","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1690,"y":120,"wires":[["4fe73ad577dc2cfc"]]},{"id":"74d67db6f3b83dfd","type":"debug","z":"b4132d0e1950d012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1830,"y":220,"wires":[]},{"id":"f5cd20a45b2e7cd7","type":"inject","z":"b4132d0e1950d012","name":"some trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"id\":1}","payloadType":"json","x":1330,"y":220,"wires":[["f07314a854f52e17","6710e9d8d43bffa5","468938b39e1d6f87"]]},{"id":"f07314a854f52e17","type":"change","z":"b4132d0e1950d012","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1595,"y":220,"wires":[["74d67db6f3b83dfd"]],"icon":"node-red/arrow-in.svg","l":false},{"id":"6710e9d8d43bffa5","type":"change","z":"b4132d0e1950d012","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1595,"y":280,"wires":[["74d67db6f3b83dfd"]],"icon":"node-red/arrow-in.svg","l":false},{"id":"468938b39e1d6f87","type":"change","z":"b4132d0e1950d012","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1595,"y":340,"wires":[["74d67db6f3b83dfd"]],"icon":"node-red/arrow-in.svg","l":false}]
1 Like

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