I have a workflow in which I’d like an email sent to multiple recipients via the Microsoft 365 Email module. The recipients come via an Airtable Get a record module, from a rollup field in the table.
I’ve tried changing the rollup field to a lookup, I’ve tried using the Iterator, the Array aggregator, and/or the Split function… no matter what I try, there’s an error in sending this email.
I’ve successfully used the same modules before similarly, the only difference being I’ve previously aggregated the recipient emails from multiple records (using the Airtable Search records module), and send multiple instances using the Iterator. The difference this time is that multiple recipient emails are coming from the same record and field.
Ideally I’d also like for this email not to be iterated; i.e. I’d like all recipients to be included in one email.
The issue with this is if you are using rollup field, if I am not mistaken the result is comma separated field, right?
What you want to do is, after the Get Record in Airtable, Place an Iterator, with Input as split(rollupfield;,).
After which, Use an Array Aggregrator that aggregates the value. In the array aggregator place, Choose Target structure type to Send Email’s Recipients Field
You are almost there, in Email address instead of using the email from the Airtable, Use the one that you have as value from the Iterator and leave the name field as empty.
It is cause you are using Search Modules beforehand, which is returning to result, what you can do is, in the Array Aggregator set the Source Module to Search Records instead of Get Record, that should fix the issue.
I think it is cause you are getting two different records from Search Records, which have the same email addresses, thus it is getting duplicated after the aggregator.
Not sure what your workflow looks like, Is it possible to limit the result to 1 in Search Records module?
Thank you - yes, you were right: the search module was a leftover from the draft, which involved a split at a router (and for testing purposes, the same two people were used for both forks - in reality I expect them to be different people). But thanks to your advice, I’ve revised the workflow and figured out the search isn’t needed And I’ve learnt something I can use to revise a similar scenario as well.
Thank you so much for your help and patience, once again
Ok - made a lot of progress on this, and tweaks as new issues arise! Another, seemingly small, thing has cropped up which I can’t get my head around:
My email sends fine to multiple recipients just fine:
…however, I can’t seem to dynamically put all of their names in the body of the email, only the name of the first returned person that successfully passes the filter I’ve setup:
(And I need it to be the names from the records that pass the filter only, to ensure that people who haven’t already received the email are named in the body of this email).
I assume it’s because I have my Iterator setup to map the Email field, and then the Array aggregator, which is setup to target the Microsoft 365 Email module, uses the Value from the Iterator in the Email Address field, as suggested above.
Is there any way to set this up to also pass the array of Names into the body of the email?