Google Apps Scripts for filtering Gmail in Sheets

Made a couple of Google Apps Scripts yesterday/today.

The first one counts how many unread emails in your Gmail Inbox from a domain or particular email address, and adds the number in the adjacent cell in the spreadsheet. There is some conditional formatting applied to show what’s above 0, and what’s 20 and above.

The second one generates a link with pre-set filters to take you to your inbox and only shows those emails.
(only reason I’m using the menu/popup for this one is that you can’t put inline buttons in Google Sheets cells programatically. The alternative would be hyperlinks, but then it needs two clicks, and is kinda ugly.)

They both get added to a new custom menu item in Google Sheets.

The purpose/idea is so that you can keep your mind on a specific job/client and still check communication from them without the distractions of everything else in your inbox clogging up your thoughts. (could also be just a me problem)

Share this post

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.