Help

Automation to send list of records to several suppliers

Topic Labels: Automations
1781 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Nicolas_Condour
4 - Data Explorer
4 - Data Explorer

Hello,
I’m trying to make an automation to send several records to my suppliers at a scheduled time but I cannot make my automation works.
In my base, I have one table where I have hundreds of suppliers, and i’m using another table to register all the payments I make each day.
I would like an automation to :

  • Search all the payments made the day before
  • Make a list for each supplier
  • Send only one mail per supplier with all the records matching the condition {Date of payment} is yesterday

The problem I have is that if I used as a trigger a specific time, i’m not able to make a list of each record by supplier. Either i have to send all the payments to all my supplier in one email, either I can select the records matching a supplier but the automation send one email per record so some of my suppliers will receive several times the same email.

I have hundreds of suppliers and payment each day so making one automation per supplier is not an option.

Anyone who can help me to fix it ? :slightly_smiling_face:

Thank you !

Nicolas

2 Replies 2

Welcome to the community, @Nicolas_Condouret!

Airtable’s Automations won’t loop through records, which is what you need it to do. You need it to loop through suppliers, and then send an email to each supplier with their payments from the day before.

So you would need to come up with a workaround to do this. A few common workarounds are:

  1. Writing a custom Javascript script to loop through your suppliers.

  2. Instead of looping through records, figure out a way to trigger each supplier individually, so they each trigger their own individual automation. You could write a formula field in Airtable that compares the current day & hour to NOW(), and if it’s the same, then it could result in the phrase “Send Email”. This phrase could be the trigger for your automation. (This one is relatively advanced to pull off, since Airtable doesn’t refresh NOW() on a reliable schedule.)

  3. Instead of looping through records, you could create a utility table that links to your current suppliers table, along with 2 automations. This is a popular trick that I describe in this BuiltOnAir podcast episode:

  1. You can use an external no-code/low-code automation tool like Make, which gives you both (1) 100% accurate scheduling times, and (2) always loops through found records to send individual emails. Your Make scenario could search for the suppliers, and then Make will automatically loop through all the suppliers for you. For each supplier, you could then search for all of their payments from the day before. Then, you could aggregate all of those payments together using the text aggregator, and put the text into an outgoing email. Your Make scenario might look something like this:

Screen Shot 2022-11-25 at 5.05.35 PM

Hi Nicolas, I put something together here for you to check out

I assumed that you had two tables, one for Payments and one for Suppliers

The automation’s works via a trigger on a formula field in the Payments table that checks whether the Date of Payment value was yesterday, and if it’s true it’ll send an email

This means that it’ll run once per Payment record you’ve created though, which may use up more automations than you’d like