Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Oct 18, 2023 12:16 AM
As per the attachment, I have created an automation with multiple steps starting with a form being submitted and ending with an email being sent to the customer who submitted the form.
The email body requires data from the previous steps of the automation to be updated.
The problem is that it seems the automation doesn't run in sequence (each step following once the previous one has been complete), rather all steps run simultaneously.
This causes the email body to be missing data, because the final email is being sent before the records have been updated according to the previous steps.
Am I doing something wrong?
Oct 18, 2023 12:40 AM - edited Aug 14, 2024 09:36 AM
Automation action steps always run sequentially, never simultaneously.
However, I have noticed delays with lookup fields & rollup fields getting their values refreshed/displayed after a linked record field is updated, especially if they involve a synced table.
Are you including lookup fields or rollup fields in your email?
If so, the best solution would be to add a 5-second pause before your emails are sent, but the bigger problem is that Airtable has given us no native ability to insert pauses or delays in our automations.
The only way to insert a pause is to use the “Run Script” action and write a custom JavaScript. Here’s a script that gives a 5-second delay/pause:
function delay(seconds) {
const startTime = Date.now()
while (Date.now() - startTime < seconds * 1000)
continue
}
delay(5)
One thing to note is that most of these limitations and workarounds disappear when using Make’s advanced automations for Airtable, which is the most powerful automation tool on the market for Airtable.
Make even offers its own built-in sleep tool to add pauses or delays in an automation, although those typically aren’t even necessary because Make communicates with Airtable via its API, so it only continues to the next step after it gets a successful response from Airtable.
Even better, you can tell Make to process automation runs one-at-a-time instead of simultaneously, to make sure that all automations are processed in an exact order.
There is a small learning curve with Make, which is why I created this basic navigation video to help. I also provide the links to a few other Make training resources there as well. For example, to instantly trigger your Make scenarios from Airtable, check out this thread.
p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld
Oct 23, 2023 12:48 PM
Thanks Scott,
Yea, I was using a lookup field. Thanks that good to know about the delay.
I ended up changing it to the respective field in "Find Records", but the problem is that the find only displays results as a list.
If there are multiple records found in the automation, it will display them all in a list. But I only want the most recent one, which is why I created a lookup field to get that data but limit it to 1 result.
Are there any solutions to get around that find record issue?
Oct 23, 2023 01:14 PM
That's pretty challenging in Airtable, but I discuss how to do that in this episode of the BuiltOnAir podcast.
However, as I was mentioning above, I typically have most of my Airtable consulting clients doing this sort of thing with Make's Airtable automations, because it's so easy to specify "the most recent value". However, if you've never dived into Make before, the challenge would be getting over the learning curve of understanding Make.