From 82ee70ec1c283dc8795d29810d11b6fd38a7085c Mon Sep 17 00:00:00 2001 From: Jason Cosper Date: Mon, 29 Jul 2019 17:45:01 -0700 Subject: [PATCH 1/5] Update README.md --- README.md | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2ad1c06..c78ebfe 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,32 @@ # noneroll -archive low priority emails and send daily summary (unroll.me without 3rd party access) -# Setup -1. Create a new spreadsheet in google sheets that keeps track of low-priority email addresses -2. Create a new gmail folder. Mine is called ```zbulk```. If you name it differently, replace ```zbulk``` in the ```noneroll.gs``` file to the folder you want. As you add emails to this folder, the spreadhsheet gets populated with email addresses that will regularly be archived -2. Create a new google app scripts project - - copy code from ```noneroll.gs``` to the existing ```Code.gs``` or a new file if you choose - - replace ```sheetID``` with the id of the sheet created in step 1 - - replace ```zbulk``` in the functions ```arch```, ```addEmail```, and ```getEmails``` to your bulk folder label -3. Create project triggers. I run - - ```arch``` every 30 mins - - ```addEmail``` between midnight and 1am - - ```noneroll``` between 5 and 6am +This Google Apps Script moves your low priority (promotional, social, political, etc.) emails in Gmail to a custom label, and sends you a synopsis of recieved emails every morning for review. + +Basically, this is `unroll.me` without any 3rd party access or [creepy data brokering](https://www.nytimes.com/2017/04/24/technology/personal-data-firm-slice-unroll-me-backlash-uber.html). + +## Configuration + +1. Create a new spreadsheet in Google Sheets. Name it whatever you'd like. + - This spreadsheet will be used to keep track of low priority email addresses. +2. Create a new Gmail label. Mine is called `zbulk`, but you are more than welcome to be creative. + - Should you decide on a different label, replace every instance of `zbulk` in the `noneroll.gs` file to whatever name you have choosen. +3. Create a new Google Apps Script project. + - Copy code from `noneroll.gs` to the project's `Code.gs` file. + - Replace `sheetID` with the ID of the sheet (everything after `spreadsheets/d/` and before `/edit#` in the sheet's URL) that you created in Step 1. +3. Create project triggers. I am currently using the following settings: + - `arch` every 15 mins + - `addEmail` between midnight and 1am + - `noneroll` between 5 and 6am + +## Notes + +- Tag any emails that you wish to add to your low priority email digest with `zbulk` (or your custom label). +- Column A of your spreadhsheet will be populated with the email addresses of mail you consider low priority. +- It is a good idea to occasionally open your spreadsheet and select *"Data > Remove duplicates"* from the menu to prevent email addresses from appearing multiple times in your spreadsheet. + - Pull requests to fix this (see: automagically deduping email addresses) are welcome. +- If you want to stop mail from being flagged as low priority, remove the corresponding email address(es) from your spreadsheet and (to be safe) remove the label from any messages in `zbulk` (or your custom label). +- Low priority emails will be archived, labeled, and marked as read every 15 minutes. + +## Credits + +Forked from [a GitHub project by Niraj D](https://github.com/nirajd/noneroll). Thanks for making this possible! 🙌🏻 -- 2.39.5 From 3bf96ce5cee042d47cea45252b20e38f9aafc961 Mon Sep 17 00:00:00 2001 From: Jason Cosper Date: Mon, 29 Jul 2019 17:51:12 -0700 Subject: [PATCH 2/5] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c78ebfe..0d82876 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,20 @@ Basically, this is `unroll.me` without any 3rd party access or [creepy data brok ## Configuration 1. Create a new spreadsheet in Google Sheets. Name it whatever you'd like. + - This spreadsheet will be used to keep track of low priority email addresses. + 2. Create a new Gmail label. Mine is called `zbulk`, but you are more than welcome to be creative. + - Should you decide on a different label, replace every instance of `zbulk` in the `noneroll.gs` file to whatever name you have choosen. + 3. Create a new Google Apps Script project. + - Copy code from `noneroll.gs` to the project's `Code.gs` file. - Replace `sheetID` with the ID of the sheet (everything after `spreadsheets/d/` and before `/edit#` in the sheet's URL) that you created in Step 1. -3. Create project triggers. I am currently using the following settings: + +4. Create project triggers. I am currently using the following settings: + - `arch` every 15 mins - `addEmail` between midnight and 1am - `noneroll` between 5 and 6am -- 2.39.5 From 907a7cd3c57fe14c31d5c497d5cf9f2676fc49f6 Mon Sep 17 00:00:00 2001 From: Jason Cosper Date: Mon, 29 Jul 2019 18:02:47 -0700 Subject: [PATCH 3/5] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d82876..9422f99 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,12 @@ Basically, this is `unroll.me` without any 3rd party access or [creepy data brok 4. Create project triggers. I am currently using the following settings: - - `arch` every 15 mins - - `addEmail` between midnight and 1am - - `noneroll` between 5 and 6am + - `arch` every 15 mins. + - Archives and labels email. + - `addEmail` between midnight and 1am. + - Adds labeled email addresses to spreadsheet. + - `noneroll` between 5 and 6am. + - Sends digest of emails from past 24 hours. ## Notes -- 2.39.5 From 35c13b34328b8bce8c354ed72adc4f29fbb1389d Mon Sep 17 00:00:00 2001 From: Niraj D Date: Sun, 11 Oct 2020 12:05:32 -0400 Subject: [PATCH 4/5] slghtly updated email format and clickable link Slight change to formatting and ability to click on subject to go to email --- email.html | 81 ++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/email.html b/email.html index 378ed34..152c65d 100644 --- a/email.html +++ b/email.html @@ -1,50 +1,41 @@ - - - - - Bulk Email Summary - - + + + + + Bulk Email Summary + - - - - - - - - - - - + +
-
-

- - wrote: - -

-
- -

- -

-

- at - from - - | unsubscribe -

- -
+ + - - - - - -
- + +

+ +

+

+ at +

+

+ + unsubscribe + +

+ + +

+ +

+ + + + + + + -- 2.39.5 From 5a5aa6292312a19c5cd1c4e8bb9df76eaa0292ce Mon Sep 17 00:00:00 2001 From: Niraj D Date: Sun, 11 Oct 2020 12:06:28 -0400 Subject: [PATCH 5/5] pass permalink to email template --- noneroll.gs | 1 + 1 file changed, 1 insertion(+) diff --git a/noneroll.gs b/noneroll.gs index 2140ff7..1713d70 100644 --- a/noneroll.gs +++ b/noneroll.gs @@ -47,6 +47,7 @@ function getEmails() { for (var i = 0; i < threads.length; i++) { if (threads[i].getLastMessageDate()>maxDate){ var d = {} + d.permalink = threads[i].getPermalink() d.subject = threads[i].getFirstMessageSubject() var from = threads[i].getMessages()[0].getFrom() d.from = from.replace(/\"|<.*>/g,'') -- 2.39.5