Mar 08, 2022 05:11 AM
Does anybody have a good workaround for delaying email automations for (example) 10 minutes?
Our situation:
But:
What’s needed:
Solved! Go to Solution.
Jan 02, 2023 05:41 AM
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!
Jan 02, 2023 06:35 AM
Of course if anybody else can help me out, they are more than welcome 🙂
Jan 02, 2023 01:35 PM
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?
Jan 02, 2023 02:28 PM
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'?
Jan 02, 2023 05:08 PM
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.
Jan 03, 2023 04:37 PM
@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.
Jan 06, 2023 05:49 AM
@Justin_Barrett Thanks so much for your very helpful and detailed explanation! It works like a charm!
Oct 25, 2023 05:16 PM
@Justin_Barrett thank you man! This has been one I have been trying to solve forever.
Sep 05, 2024 04:17 PM - edited Sep 05, 2024 04:25 PM
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?
Sep 07, 2024 06:43 AM
@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.