Nexmo SMS Multi
Send SMS to multiple recipients, this example takes an input of a JSON object either as an inject or from http where to
is a list of recipient numbers and text
is the body of your message.
It then moves the value of text into the flow context, puts the to list into the message payload, then feeds that to a split node to break the list up into individual messages to be send to the Send SMS node which pulls in the flow.text content to build each SMS request to Nexmo
[{"id":"9d4badc9.bf3268","type":"inject","z":"98c1f9d6.2b5ec8","name":"","topic":"","payload":"{\"to\":[\"14155550100\",\"447700900123\"],\"text\":\"Hello\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120.5,"y":330,"wires":[["bc7506b6.f8e44"]]},{"id":"773af84c.b8dd08","type":"split","z":"98c1f9d6.2b5ec8","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":true,"addname":"","x":589.5,"y":479,"wires":[["52227fb2.6661d"]]},{"id":"bc7506b6.f8e44","type":"change","z":"98c1f9d6.2b5ec8","name":"","rules":[{"t":"set","p":"text","pt":"flow","to":"payload.text","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.to","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":335.5,"y":329,"wires":[["773af84c.b8dd08"]]},{"id":"52227fb2.6661d","type":"sendsms","z":"98c1f9d6.2b5ec8","creds":"ae5231c4.0cee28","to":"{{msg.payload}}","fr":"NodeRed","text":"{{flow.text}}","unicode":false,"x":869.5,"y":604,"wires":[["68ac7628.fdd49"]]},{"id":"68ac7628.fdd49","type":"debug","z":"98c1f9d6.2b5ec8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1209.5,"y":609,"wires":[]},{"id":"ae5231c4.0cee28","type":"nexmobasic","z":""}]