Help

Re: How to Add Delay as an Action in Airtable Automation?

4698 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Sannit_Vartak
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi,

here is the solution to this frequently asked question. Just replace the value in delay( ) to change the time of delay. The maximum delay you can give is 30 Sec per action or automation will fail. For adding more delay the work way around is to add two scripts actions one below the other (See Image).

function delay(ms) {
var limit = new Date();
limit = limit.setMilliseconds(limit.getMilliseconds() + ms);
while ((new Date()) < limit) {
    // do nothing
    ;
}
}
delay(20000); //delay 20 second



Screenshot 2023-03-07 144354.png

4 Replies 4

Just be aware that if the purpose of the delay is to let field values update, such as waiting for an attachment to upload, you will still have the original field values unless you do something to get the updated values, such as a “find records” action to get the new field values. Otherwise you will still be working with the original old field values.

Indeed! and in such cases, you can add one more search Action

gilles_prevotal
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Sannit_Vartak, and thank you for cutting so many trees in the jungle of threads pertaining near or far to this subject !

Works fine, but this warning in red in the code editor on my side ennoys me ... Do you think it is reliable ? Did you had the same by your side ?

 

Yes you can ignore the error 🙂