Skip to main content

I am trying to create an automation that will send a personalized email to a list of recipients.

 

I have a record that triggers automation when matches conditions.

I have several records linked to one field of the triggering record that link to the recipients table, where email addresses are stored.

I use Find Records to obtain a list of names and email addresses from a linked records.

I want to iterate sending Gmail to each of the addresses individually, addressing the person by name and sending the message only to one person at a time.

If that is possible, how do I use the input source data in the To: field and in the email body to address one single person - not the list of them at once.

If I do not use Find Records to create the input list, then I can only use ID and Name from the linked records and can not pull out their emails from the table where those recipient names, emails and other data are stored, leaving me with useless set of IDs and names only.

 

Thank you in advance for any thoughts

You would just need to setup a repeating group in your automation, and you would use the results of your “Find Records” step as your input list for the repeating group.

- ScottWorld, Expert Airtable Consultant


@ScottWorld That’s exactly what I have - Find Records and Repeating Group with the input source from Find Records.

But the problem is that this source includes all email addresses to the To: field of Gmail and it includes all recipient names to the message body text. But I need to iterate one-by-one, not to all of them in one single Gmail message.

I think it it because Find Records finds only one record that matches conditions (it is the same record that triggers the automation) and those found linked records become a single input source that populates to the To: field of Gmail and to the addressee name field in the mail body.

This makes Find Records useless.


Hey ​@E_K,

To iterate adequately, and send individual emails you’ll want to map the To: field to the CURRENT ITEM’s email address. Same for Name on the body of the email.

Current item refers to each item being individually iterated from the list of records found on the Find records action block!
 


Hope this helps. Feel free to reach out as needed.

Mike, Consultant @ Automatic Nation


What ​@Mike_AutomaticN said! You need to use “current item” when you’re iterating through the repeating group.

- ScottWorld, Expert Airtable Consultant


Thank you ​@Mike_AutomaticN but my Current Item is the list of items from the Find Records.

So when I map it to the To: field, I see this (attached) - it is definitely a list, not a single item.

My guess it that this is because I have only one record that triggers the automation, contains all information that I want to include in the message body and also linked records that are client names from the Clients table. Their email addresses are stored in that table and pulled out inside the linked records.

And when I choose “ClientMail’ lookup, it pulls out the list of them:

 

This is my record that triggers the automation when STS field is changed:

 

Several clients are linked and I want to send each of them individual email - one at a time, not a bunch of them listing their addresses in the To: field and listing their names in the email body when addressing them


updated answer below


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:

  1. The first automation would just loop through the found records and check a checkbox in each record.
  2. 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.  

Otherwise, all the other solutions would be much more challenging:

  1. 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.
  1. 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.
  1. 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.

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


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:

  1. The first automation would just loop through the found records and check a checkbox in each record.
  2. 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:

  1. 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?

  1. 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.

  1. 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

 


Hm, does this look right?  I made it create new records in lieu of actually sending the emails so you could see what was happening.  I’ve set it up here for you to check out

And this is what the automation looks like:


Thank you ​@TheTimeSavingCo  - that was your brilliant idea to make the list from the records linked to the Clients table.

Since I do not need to keep sent emails, I’ve modified your base and automation structure - I did not create the junction table Emails Sent, so I simply take the list of recipients from the Clients table where deals are linked, and all other data for email body from the Deals table where clients are linked. It works perfectly, thank you.


Hi, ​@E_K 

Simple way to fix this

  1.  Airtable can’t loop through a list of people automatically using "Find Records" alone.
  2.  Either use:
  • A script to send emails one-by-one inside Airtable.
  • Or use Make.com or Zapier for a no-code, easier automation.
  • Or redesign your records so that each recipient has its own row — then send email from each one.

Call for my Action:

Would you like me to write the script for you to run in Airtable automation?
Or guide you step-by-step using Make.com (easier, no coding)?
Let me know and I’ll help you like a true friend!

 

 


Thank you ​@omolara  - as I wrote in my previous message, I’ve used ​@TheTimeSavingCo idea to find records in the linked table and everything worked flawlessly


Reply