Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created March 4, 2019 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/9539be186ff257df879add0cf59b8dfd to your computer and use it in GitHub Desktop.
Save iaindooley/9539be186ff257df879add0cf59b8dfd to your computer and use it in GitHub Desktop.
Notify if inactive for some time
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