When Fivetran started almost 10 years ago, I was our first programmer. I was fired from the software engineering team a long time ago, but I still occasionally find a reason to write a little code.
I recently discovered Google Apps Script, and I've used it to solve a big problem I have as the CEO of a growing company: the avalanche of email assaulting my inbox, all day every day. I'm a loyal user of Gmail since the public beta. I even have a thread with a group of college friends that has been continuously active since 2005, but that is a story for another day. I hear good things about other email clients like Superhuman, but my personal goal is to keep using Gmail and make it work better for me.
Gmail's tabbed inbox does a great job of keeping 95% of emails out of the primary tab, but because of the sheer volume of emails I receive, I found that the search feature of Gmail became unusable due to the sheer number of old unread emails in the other tabs. This was the first problem I attacked, by writing a simple script that deletes all emails outside the primary tab after 30 days:
I set this script to run every hour, and this has fixed my search problems.
The second problem I set out to solve was the amount of cold solicitation emails I get from recruiters and sales reps. I'm sure that some of them have great products to tell me about, but to the extent that I am still involved in evaluating software and services, reading cold emails is not how I do it. My solution to this problem was a little more complicated.
First, I created a label called "Triage" and a hidden label called "SkipTriage." Then I created the following script and set it to run every minute:
This script looks at every new email that arrives in my inbox. If this email is from someone I've never emailed before, it removes it from the inbox and applies the "Triage" label. I have a fantastic executive assistant who has access to my email, and several times a day she checks each email in this category and either moves it back to the Primary tab, or banishes it to the Promotions tab. The SkipTriage label is used by the script to prevent an infinite loop, and I also set Gmail filters that apply SkipTriage to emails that I know should go straight to the inbox.
This system won't work for most people, because most people don't have executive assistants. But it's rescued my inbox, and it's fun to write a little code again.
Head to our blog to read more articles by Fivetran CEO George Fraser.