Help

Re: Delay email automation

Solved
Jump to Solution
4977 0
cancel
Showing results for 
Search instead for 
Did you mean: 
James_Carringto
5 - Automation Enthusiast
5 - Automation Enthusiast

Does anybody have a good workaround for delaying email automations for (example) 10 minutes?

Our situation:

  • When a project goes over budget, an email is sent to the project manager

But:

  • the email will go immediately, which is a problem, because the project manager might simply be in the process of updating the record, and once he’s finished with his updates, the project might not actually be over budget. Therefore, we are getting tons of false notifications.

What’s needed:

  • Some sort of pause before the notification is sent out, where Airtable checks to see if the situation is still true for that record, before sending the notification.
22 Replies 22

Hi @Justin_Barrett 

Can you please help me creating this:

I’ve used LAST_MODIFIED_TIME() comparisons on multiple occasions to build automation triggers, and have never run into issues. My trigger formulas typically look like this:

AND({Field To Watch}, NOW() > DATEADD(LAST_MODIFIED_TIME({Field To Watch}), 5, "minutes"))

This ensures that the field actually contains data, and that data was last updated more than five minutes ago. If both conditions are true, the formula will output a 1; otherwise it outputs zero. The datetime returned by LAST_MODIFIED_TIME() updates with every saved change to the field, which means multiple changes for even the simplest thing the user might type. That constantly pushes out that five-minute endpoint, so I don’t even think about how often NOW() is updating or how fast the user types. Both are irrelevant because the target is five minutes away from their last edit.

Right now I have an email automation that fires too quick, so the emails that are being sent, are w/o information. How would I do the above mentioned? Do I need to make a new Field in the table? How does the automation look like? 

Thanks a lot in advance!

Of course if anybody else can help me out, they are more than welcome 🙂 

@kuovonne @Karlstens 

I'm not sure I understand the updated problem at hand - you've mentioned that the 5 minute timeout formula is working - doesn't' this then trigger the automation that contains the record data that was entered 5 minutes ago?

Hello @Karlstens 

Thanks for getting back. 

I haven't done anything yet. I just read the reply from Justin, but don't really understand the formula - and how the Automation should look like. 

Fx. in the formula; does anything comes before 'AND'? And which field should I insert in 'Field to watch'? 

You'll be best to step back from these forums and have a crack at finding your solution with the tips and advice already provided.

As with all things programming, break bigger problem down into lots of smaller but easier problems - and repeat that until you start solving those smaller problems, and once you've solved all the smaller problems you'll find that the big problem is also solved.

Post some screen shots of your progress in a couple of days so we can check in with your progress.


@plyske wrote:

Right now I have an email automation that fires too quick, so the emails that are being sent, are w/o information. How would I do the above mentioned? Do I need to make a new Field in the table? How does the automation look like? 


You didn't specify how your automation is currently designed, but my guess is that you're using the "When a record is updated" trigger, which is likely the core of the issue. Even the smallest change to any field counts as an update as far as that trigger is concerned, and this is likely why the email is being sent without any info.

First off, you'll need to add a formula field and add that formula that I mentioned, changing it to reference the specific field that you want to use to drive the automation. For example, if your table contains a "Comments" field and you want to wait at least 5 minutes after that field has been edited, you'll replace both instances of {Field to Watch} in the example formula with Comments.

Now change the trigger on your automation to "When a record matches conditions," with the condition being that the value from the formula field you just created equals 1. That will only be true 5 minutes after you finish editing the chosen field; the rest of the time it will be 0. (NOTE: the value will stay at 1 long after the 5-minute delay has passed, but that's not a problem. The automation will only re-trigger on a given record when the value returns to 1 after being reset to 0 when the chosen field is edited again.)

With those changes made, your automation should wait at least 5 minutes after the last edit in the specified field before it fires and executes your desired actions.

plyske
7 - App Architect
7 - App Architect

@Justin_Barrett Thanks so much for your very helpful and detailed explanation! It works like a charm! 

dchase
4 - Data Explorer
4 - Data Explorer

@Justin_Barrett thank you man! This has been one I have been trying to solve forever. 

TWarwick
4 - Data Explorer
4 - Data Explorer

Hi - thanks for this.  Been having the same issues and racking my brain.  What would the formula look like if I need to monitor a change to more than one field? Not all the fields would necessarily be changed, but only if something is modified in one or all of them?  So if it takes one of my team a few minutes to update each field, then the automation waits 5 minutes to kick off the email notification?

@TWarwick The LAST_MODIFIED_TIME() function can accept more than one field reference. Changes in any or all of the listed fields would cause it to output a new modification time.