Skip to content

Instantly share code, notes, and snippets.

View priyeshgautam's full-sized avatar
🎯
Focusing

Priyesh Gautam priyeshgautam

🎯
Focusing
View GitHub Profile
@priyeshgautam
priyeshgautam / README.md
Created October 8, 2020 16:12 — forked from jamesramsay/README.md
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
@priyeshgautam
priyeshgautam / Code.gs
Created October 8, 2020 16:03 — forked from benbjurstrom/Code.gs
PurgeOldEmails
/*
|--------------------------------------------------------------------------
| PurgeOldEmails
|--------------------------------------------------------------------------
| https://gist.github.com/benbjurstrom/00cdfdb24e39c59c124e812d5effa39a
|
*/
// Purge messages automatically after how many days?
var DELETE_AFTER_DAYS = 7