Yeah, unfortunately, Airtable’s automations are very limited, so they don’t let you do a loop within a loop.
In other words. you can’t loop through a list of found records, and then loop through each email address within each record from the original loop.
Probably the easiest thing to do would be to create 2 automations for this:
- The first automation would just loop through the found records and check a checkbox in each record.
- Then, the 2nd automation would be triggered by the checkbox being checked in any particular record, and that automation would loop through the email addresses for that particular record.
Thank you @ScottWorld but the point is that I have only one single record to which several clients are linked. This record when matches conditions triggers automation sending a Gmail.
So what does the first automation do?
Several clients are linked to this record and they contain the names of the clients. Another table contains their email addresses and other client details.
So what do the second automation do?
Otherwise, all the other solutions would be much more challenging:
- One solution would be to restructure your database to accommodate this sort of thing, such as creating a many-to-many relationship with a junction table, where each record contains one email address.
Well, I have to figure out how to create this many-to-many relation and what will be the junction table fields - do I really need that?
- Or, if you know JavaScript, you could write your own JavaScript code to do this. ChatGPT might even be able to come up with a script for you.
I do not know JavaScript and would hardly be able to create a prompt for ChatGPT to make me a script for this task.
- However, I really like turning to Make’s advanced automations for Airtable, which gives you thousands of advanced features that you can’t get with Airtable, such as looping within a loop.
I have most of my advanced automations running through Make. If you’ve never used Make before, I’ve assembled a bunch of Make training resources in this thread. For example, here is one of the ways that you could instantly trigger a Make automation from Airtable.
I also give live demonstrations of how to use Make in many of my Airtable podcast appearances. For example, in this video, I show how to work with Airtable arrays in Make.
That would be great but I’d never get any budget for anything besides Airtable bills, our accounts are strict on that...
Hope this helps!
If you’d like to hire the best Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld