News for hackers. Stuff that matters.
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by wolfgang42 on Monday November 05, 2018 @01:38PM (#18384702)
If anybody wants to do this to their own GMail account without putting trust in a third party, this is pretty easy to do with the little-known Google Apps Script. You can write JavaScript that will run on Google's servers and do whatever you want to your account. (I use this to archive various automated emails if I haven't bothered to look at them, to keep them from cluttering my inbox after they're obsolete.)

Here's a script which I think should do the job, assuming you have a filter set up to move all incoming mail to a label called 'hidden_mail' (warning: untested!):

    function checkMail() {
        GmailApp.moveThreadsToInbox(GmailApp.search('label:hidden_mail'));
    }
Just create a new project on https://script.google.com/ , paste in this code, and then Edit > Current Project's Triggers and add a trigger to run checkMail() on whatever schedule you want.
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by kimburgess on Tuesday November 06, 2018 @12:47AM (#18388694)
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);
  }
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by buremba on Monday November 05, 2018 @02:53PM (#18385358)
You could automatically archive the emails with that labeling feature as well, no need for the Google Scripts.
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by wolfgang42 on Monday November 05, 2018 @02:59PM (#18385408)
Really, how? I've never seen any options anywhere to apply labels after a certain time. Or is there a trick I missed?
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by buremba on Tuesday November 06, 2018 @07:06AM (#18390218)
What I understood is to add labels to e-mails and archive the emails that match those labels immediately. That way, you won't get any notification for those emails. Instead, you can open the emails whenever you want. Here it is: https://cl.ly/122f791d609c
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by rco8786 on Monday November 05, 2018 @08:32PM (#18387613)
Presumably you would write the code to do it...
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by wolfgang42 on Monday November 05, 2018 @08:57PM (#18387735)
buremba specifically said that there wasn't any need for Google Scripts.
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by h1d on Monday November 05, 2018 @05:54PM (#18386763)
Off topic but I wonder why people, especially usually privacy sensitive HN readers use Gmail and turn themselves into Google's better product with nothing to gain?

Running your own server or use a more privacy catered provider with Thunderbird or whatever client isn't so hard.

Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by Tracist on Monday November 05, 2018 @06:15PM (#18386876)
Nothing to gain? How about time? That's the common benefit of every *AAS product, both free and paid.

I could self host my own email server, cloud storage and backup solution, calendar software, facebook-alternative node, blog.

Or I could use gmail, GDrive, google calendar, facebook and wordpress.

Yes, I can do everything myself, but now I'm spending my time maintaining each of those different self hosted solutions.

Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by hnmonkey on Monday November 05, 2018 @07:55PM (#18387436)
To pile on, gmail is also well-known to have fantastic spam and phishing prevention abilities compared to most other email solutions, something you could literally never do at home yourself without some incredible software that you run yourself (and even then probably not). That's a huge value-add for a ton of users I'd imagine.

'Nothing to gain' is incredibly hyperbolic I think or this person has never read about gmail/used gmail before.

Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by h1d on Monday November 05, 2018 @06:26PM (#18386931)
You seem to care more about the one time setup effort than continuously feeding yourself to Google.

Besides, there are providers like Proton if you can't afford to set one up.

Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by jensv on Monday November 05, 2018 @06:39PM (#18387000)
Convenience and security are often at odds with one another. Not that Gmail search is any good but you can't search through encrypted mail, as an example.
Re:Show HN: Adios.ai – Stop email interruptions, receive ema... by the_duke on Monday November 05, 2018 @02:08PM (#18384976)
That's an awesome solution, thanks!