I’d like to send an email notification when records are created in Airtable. I was able to easily create a zap that does this but the problem I’m having is that multiple records are created at once via the CSV Import block and an email is being sent for each record. Is it possible to send only one email for each batch of records that are created?
Hi
That’s a great question, and not as easily-achievable as one might think it should be.
My initial thought is that when you create multiple records at once, that whole batch will end up having the same trigger timestamp. What you could do is trigger on a new record, then add a Storage step that increments by 1 using a key of that timestamp. Then add a filter to only continue if the value there is 1 (meaning the first record came through and increased the value). Once the second one comes through it will make the value 2, and the filter will stop it. And all the rest after it.
Here’s what I mean:
As you can see here in Task History, only one record from each of those batches made it through the filter step and ended up notifying me:
You’ll be using one extra task per record created, and then one more task for the ones that pass the filter. That’s about the easiest way I can think of to do it though.
I’m really new to this so I might not be understanding your method correctly but it looks like I’d have to make a task for each record uploaded. If that’s the case I don’t think it will work because the number of records in each upload/creation is not consistent and can easily exceed 100 records! Let me know if I’m getting it wrong. I really like your approach though. I’m keeping that one in my back pocket for later!
Hi
Are you able to add anything to the first row of the csv file that would denote that it’s the first record? If you could, then you could use a filter step that checks for that bit of info and stops the Zap if it’s not present. That would only add one extra task per batch upload (not per task), but it relies on you being able to add something in the first record of the upload.
Hello
I ended up with a somewhat rinky-dink work around but it will work for my organization. First, I ditched the csv upload block and am using Dropbox for the trigger, Zapier formatting and the On2Air actions bulk upload to Airtable. Out of 10 individual cardholders 7 always have credit card transactions so for those cardholders I just added email notification steps to the same zap that uploads the CSV. For the other 3 cardholders I used Paths to check for new transactions (via a rollup field in Airtable) and conditionally send notifications. When we outgrow this Zap we’ve got bigger and better problems!
Thanks for sharing your workaround
Please keep us posted should you need any assistance with your Zaps as you continue to grow!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.