Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created January 17, 2019 22:11
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/8f68c95b744792ec59494be08552c7ff to your computer and use it in GitHub Desktop.
Save iaindooley/8f68c95b744792ec59494be08552c7ff to your computer and use it in GitHub Desktop.
Alert before due
function scheduleAlertBeforeDue(notification,signature)
{
new Notification(notification).actionOnDueDateAdded("actionAlertBeforeDue",signature,function(date)
{
date.minusDays(7);
});
}
function actionAlertBeforeDue(notification)
{
//If you have a Google Sheet mapping username to slack DM handle you could post
//to the Slack API instead
new Notification(notification).card().postComment("@card due in 1 week!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment