Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am mnestor on github.
  • I am mnestor79 ( on keybase.
  • I have a public key whose fingerprint is 6EA0 DCD9 62A6 DC00 DCAB 35E8 5B4B EFED 5F00 8360

To claim this, I am signing this object:

mnestor /
Created Jul 21, 2017 — forked from jamesramsay/
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
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted