Me Productivity

InBox Zero And Quantified Self

I’m a huge fan of keeping my inbox empty, but not very good and keeping it that way.

I’m becoming more interested in the “Quantified Self” concept i.e. you can only fix things that you can measure.

The obvious answer is to monitor what my GMail inbox looks like on a daily basis.

At first I thought this would be a horrendous script but today; whilst eating my lunch I got it to work – not only that, it’s blindingly easy. It’s using my favourite tool of the moment Google Spreadsheets and the script editor:

function myFunction() {
var doc = SpreadsheetApp.getActiveSheet()
var firstEmptyRow = doc.getLastRow() + 1;
var gmailUnread = GmailApp.getInboxUnreadCount();
var gmailInbox =‘in:inbox’).length
var gmailStarred =‘in:starred’).length
var gmailSpam =‘in:spam’).length
doc.getRange(firstEmptyRow, 1, 1, 1).setValue(new Date().getYear() +”-” + (“0” + (new Date().getMonth() +1)).slice(-2)  + “-” + (“0” + new Date().getDate()).slice(-2));
doc.getRange(firstEmptyRow, 2, 1, 1).setValue(gmailUnread);
doc.getRange(firstEmptyRow, 3, 1, 1).setValue(gmailInbox);
doc.getRange(firstEmptyRow, 4, 1, 1).setValue(gmailStarred);
doc.getRange(firstEmptyRow, 5, 1, 1).setValue(gmailSpam);

I have scheduled this to run once a day at midnight and record a new row in the spreadsheet capturing the date, unread items, inbox count, starred count and spam items.

In an ideal world, each of these should be 0 (maybe not so at midnight) !

Next, to incorporate the stats on my personal dashboard; which is a blog post for another day!

3 replies on “InBox Zero And Quantified Self”

Leave a Reply

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