Hacker News new | ask | show | jobs
by kimburgess 2787 days ago
This is awesome. I've been wanting to setup this functionality for a while, but wasn't aware of Apps Script. One thing missing in the above is to remove the 'hidden' label.

  var buffer = GmailApp.getUserLabelByName('buffered');

  function release() {
    buffer.getThreads().map(unbuffer);
  }

  function unbuffer(thread) {
    thread.moveToInbox();
    thread.removeLabel(buffer);
  }