I automatically collected stats about my Gmail account…here’s what I found

Back in December, I started automatically collecting stats about my personal and work Gmail accounts every hour…of every day….of every week. It started as pure curiosity to see if the Gmail API was easy to work with in AppScript (it is), but turned into figuring out things like how much email I churn through, and when the busiest times of the day were.

Received email

Pretty consistent across most hours of the day.

I wonder what that looks like for “unread” email in my inbox?

Similar kind of trend to the total, though i may need to compare numbers

Emails from my own domain?

Emails from my own domain (people where i work)

What about emails from External addresses (not my domain)?

This might be the most striking comparison of all.

So..it looks like people from other organizations email me during “daylight” hours, whereas there’s a steady flow of email from within my domain (which includes automated process emails of course too).

I also collected stats about emails from a particular product to see what that looked like.

Emails from our ITSM platform

What about Spam?

Median spam count per hour

Sent Email

But if i reduce to just working hours, my work account looks like this:

Work Account: Sent Email Average for Business Hours

By the way, it’s easy to figure out when a metric is from a weekday & working hour in datastudio …the code looks like this:

WHEN HOUR(Audit_Date) > 7 AND HOUR(Audit_Date) < 18 AND WEEKDAY(Audit_Date) > 0 AND WEEKDAY(Audit_Date) < 6 THEN TRUE

Basically, get the HOUR and WEEKDAY of the given date, and if those are Mon-Fri 8–5, then the dimension value is TRUE. Then we can create data controls to filter the report by those things.


What this doesn’t capture is chat activity. I do have google calendar activity though…which is for another blog. I’ve been collecting that since before i started collecting gmail stats.

If you’re interested in the code that i used to do this, here’s the repo.

If you need instructions on how to use the appscript, check out my other medium articles like this one when i first posted about this process of collecting gmail stats.

Enterprise Analytics Architect; Google, Box and some Internet2 Advisory Boards & working groups. Higher Ed IT since 2002. @techupover and @usaussie on twitter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store