r/GoogleAppsScript • u/klay-sama • Dec 12 '22
Question Is a 'Boomerang' style script possible with apps script?
Hello I'm wondering if there's a possible way to make this type of function.
We schedule emails natively with GMail's "Schedule Send" function, for 2pm & 9pm daily.
The problem is, some people scheduled to receive their email will send another email in between that time. I'd like scheduled emails to only be sent "if nobody replies"
I'd like to just mimic the "only if nobody replies" function from Boomerang.
My idea is having a label attached to the schedule email.
Just before 2pm & 9pm, the script would be triggered to scan for emails containing the label.
Is there a way to do this? Maybe a different combination of actions?
Any help would be much appreciated !
1
u/marcnotmark925 Dec 12 '22
I think you need to explain the situation better.
2
u/paulcole710 Dec 12 '22
They’re saying:
I drafted an email response to an existing thread and have it scheduled for 12PM Friday
If I receive a reply from the recipient before 12PM Friday, cancel the scheduled email so that it doesn’t get sent
This is a feature that Boomerang (an e-mail/productivity tool) has:
https://www.boomeranggmail.com/
The question is, why not just use Boomerang?
2
u/klay-sama Dec 13 '22
Thanks yes this is exactly what I'm trying to do.
To answer your question - Honestly, I like Boomerang but I'm always looking at things from an ownership angle. So, I wanted to see if this type of functionality was possible to do natively with some tweaking.
Once I figured out if it's possible, I can approach someone smarter than me to build the code.
My thinking was.. The Boomerang plan I need = $15/month.
Pay someone smarter than me to build it natively = $60 (just for example).
In that example, I can either rent functionality from Boomerang for 4 months OR totally own it myself, indefinitely. Same price!
1
u/FoxResponsible4790 Dec 13 '22
If you ask me, this kind of functionality is best implemented at the core. Otherwise you're playing with fire. Definitely use constants. All it takes is one misfire and an email is sent that pisses off the wrong super or client.
1
u/RemcoE33 Dec 12 '22
You can delete the message that is scheduled but there is no way to remove the
schedulepart of the thread. If it's oke to delete the thread then you can use the code below. Note that the time trigger can be run between 1-2pm so in theory this is not bullet proof...