How to handle varying number of recipients for ClickSend text messages

I have a similar scenario to this one using ClickSend to send text messages. I have up to let’s say 10 recipients, but it won’t always be 10. So if 7 goes in and the 8-10 are blank, the scenario breaks. I guess I could do a router and have it branch into 10 paths based on the number of recipients, but that seems like the dumb way to do it and there’s a more elegant solution (that maybe you have). Thoughts on this?

@loic.wiseflow explained it in this post:

I’ll use Gmail as an example here since I don’t have ClickSend.
image
You can keep clicking on Add a recipient to add additional emails, but if you don’t know ahead of time how many email you will be sending to, you need to map this field instead.

If you hover over “To” you can see it wants an array:
image

Click Map to turn that on, then the field will now expect an array as input:
image

Here one way you could do it, if all the emails were in a comma-separated string
image

Or, if you have an array aggregator somewhere before the email module, you can just use the array variable from the aggregator. Hope this makes sense.

1 Like