I am trying to automate sending an email to multiple recipients, but the number of recipient isn’t always the same. The format needs to be: One array containing multiple collections. Each collection contains the email of one recipients.
I was able to get my emails into this format, but the issue is that if recipients #5 doesn’t exist, it still creates a collection (that is empty). How can I remove empty collections from the array?
Hi. Maybe you can try create a json with the array result, remove the collection empty using replace function and parsing the json again before send the emails. It’s a guess. I do not see your array but I thing this approach can works
If you have questions reach out