Here is a Google Script for using SaneBox alongside Unroll.me - Tubblog: The Hub for MSPs

Here is a Google Script for using SaneBox alongside Unroll.me

Here is a Google Script for using SaneBox alongside Unroll.me image

A Google Script for using SaneBox alongside Unroll.meI’ve written before about my drive towards living the Inbox Zero methodology and my experiment in reducing my emails by a quarter.

Two tools that I use to stem the tide of emails I receive are the excellent SaneBox and Unroll.me. Here’s a guide to using SaneBox alongside Unroll.me

SaneBox and Unroll.me

SaneBox is a fantastic tool that sits between my inbox and me and filters mail into various folders to help me to prioritise my email consumption. For instance, any email newsletters I receive are removed from my inbox and pushed into the @SaneNews sub-folder — so I can deal with them in batch and without them distracting from my important emails.

Unroll.meUnroll.me is another super free tool that captures any email newsletters I subscribe to and rolls them up into a daily digest. I can then scan read this digest at my leisure, rather than opening and closing each individual email newsletter.

Using SaneBox alongside Unroll.me is very useful to me.

Using SaneBox alongside Unroll.me

Unfortunately, SaneBox and Unroll.me don’t seem to plSaneboxay well together. SaneBox wants to move email newsletters to its @SaneNews folder, and Unroll.me wants to archive the messages in Google Mail. The end result is that I get both Unroll.me digest emails and (albeit marked as read) email newsletters in my @SaneNews folder.

It’s hardly the end of the world, but it is an irritation for me to have to select all the “read” email newsletters each day and manually remove the @SaneNews label in GMail.

Surely there is an automated way of doing this?

SaneBox and Unroll.me don't seem to play well together. Here's a Google Script to help Click to Tweet

A Google Script to remove Unroll.me emails from @SaneNews

Thanks to a blog post by Fwed on Medium, and a Google Script by Amit Agarwal from StackOverflow that I’ve modified, there is.

Follow these steps to create a Google Script for your own Google Mail:-

A Google Script for using SaneBox alongside Unroll.me

function archiveYThreads() {
var label = GmailApp.getUserLabelByName(“@SaneNews”);
var threads = GmailApp.search(‘label:”Unroll.me”‘);
for (var i = 0; i < threads.length; i++) {
threads[i].removeLabel(label);
}
}

  • Click File > Save
  • Name it Gmail AutoArchive for Unroll.me (the script will be saved into the root folder of your Google Drive)
  • Click the Run button
  • Google Script will ask you for access to your Gmail. Allow this and proceed.

Give the script a few seconds to run, and you should notice that any emails in your @SaneNews folder that are labelled “Unroll.me” disappear — archived away.

Finally, to set this script to run automatically in the background:-

  • Within your Google Script window, click on Resources > All your triggers
  • Add a new trigger with the following settings: Time-driven, Minutes timer, Every 15 minutes.

Every 15 minutes, Google Script will scan your @SaneNews folder and if it finds any messages processed by Unroll.me, it will remove the @SaneNews label and archive the messages.

Conclusion

I’m absolutely no Google Script expert, and I created this script through simple trial and error using the work Fwed and Amit Agarwal provided as a basis. If anybody with more experience than me with Google Scripts would like to suggest any modifications or updates, please leave a comment below or get in touch with me. As it is, the script seems to work for me at least.

I hope any other SaneBox and Unroll.me users find this script useful!

You Might Also Find Interesting

RICHARD TUBB

Richard Tubb is one of the best-known experts within the global IT Managed Service Provider (MSP) community. He launched and sold his own MSP business before creating a leading MSP media and consultancy practice. Richard helps IT business owner’s take back control by freeing up their time and building a business that can run without them. He’s the author of the book “The IT Business Owner’s Survival Guide” and writer of the award-winning blog www.tubblog.co.uk

All Posts

You might like:

Super Top Tech For Your Pampered Pet Guinea Pigs image

Super Top Tech For Your Pampered Pet Guinea Pigs

Tech Guides | By Richard Tubb
How to monitor online mentions of your business with Google Alerts image

How to monitor online mentions of your business with Google Alerts

Building Relationships | By Richard Tubb
How do I remove a LinkedIn contact? image

How do I remove a LinkedIn contact?

Tech Guides | By Richard Tubb

How to remove the Windows 10 Upgrade icon

Tech Guides | By Richard Tubb
What to do if you lose your Amazon Kindle image

What to do if you lose your Amazon Kindle

Tech Guides | By Richard Tubb
British Gas Hive Active Heating Review image

British Gas Hive Active Heating Review

Tech Guides | By Richard Tubb
How to build a high traffic blog on WordPress image

How to build a high traffic blog on WordPress

Tech Guides | By Richard Tubb
How to block Yesware from tracking you image

How to block Yesware from tracking you

Tech Guides | By Richard Tubb
Using a Three Home Signal Femtocell to improve a Mobile Phone Signal image

Using a Three Home Signal Femtocell to improve a Mobile Phone Signal

Tech Guides | By Richard Tubb
Taking a look at GFI EventsManager 2013 image

Taking a look at GFI EventsManager 2013

Tech Guides | By Guest Author
Recommended Podcasts for IT Professionals image

Recommended Podcasts for IT Professionals

Tech Guides | By Richard Tubb
Why I moved from Microsoft Office 365 to Google Apps – Part Two image

Why I moved from Microsoft Office 365 to Google Apps – Part Two

Tech Guides | By Richard Tubb

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Explore.

Share via
Send this to a friend