Created
March 4, 2019 22:39
-
-
Save iaindooley/9539be186ff257df879add0cf59b8dfd to your computer and use it in GitHub Desktop.
Notify if inactive for some time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function notifyIfInactiveForSomeTime(notification,signature) | |
{ | |
ExecutionQueue.push("checkLastActiveAndNotify", | |
{id: new Notification(notification).card().id()}, | |
signature, | |
Trellinator.now().addDays(3)); | |
} | |
function checkLastActiveAndNotify(card) | |
{ | |
var card = new Card(card); | |
if(card.lastActivity() < Trellinator.now().minusDays(3)) | |
MailApp.sendEmail("user@domain.com","Card inactive!","This card has been inactive 3 days: "+card.link()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment