Skip to content

Instantly share code, notes, and snippets.


Rich Armstrong richarmstrong

View GitHub Profile
richarmstrong /
Created Dec 17, 2018
Label all gmail conversations you were having on this day in the past.
// This function finds all the conversations you were having on this day in the past years (since Gmails release in 2005),
// and adds the "On This Day" label to them. Put it in a new apps script project and set it to run at 3am every day.
// It'll first clear out the label and then add all relevant messages.
function onThisDay(){
var onThisDayLabel = GmailApp.getUserLabelByName("On This Day")
var date = new Date()
var yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
var tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);

Keybase proof

I hereby claim:

  • I am richarmstrong on github.
  • I am richarmstrong ( on keybase.
  • I have a public key ASCcnnXY97j_cHK_agTkPzxtnKgpSfFuqXgL3ikcrA3AEAo

To claim this, I am signing this object: