Show How Busy you are with the Gmail Counter
Would you like to know how many unread email messages are there currently in my Gmail inbox? Click here. What you’ve seen is a real-time counter that displays the number of unread emails in my Gmail. And I made it using a very simple Google Script.
If you are feeling overwhelmed by the volume of email in your mailbox, you can probably include a link to this Gmail counter in your email signature, or in your website’s contact form, and it may deter people from sending you more messages. Or it will at least let them know how busy you are.
Gmail Counter for your Unread Messages
Here’s how you can publish your own Gmail counter to the world.
- Click here to copy the Gmail counter script to your Google Drive.
- Go to Run -> doGet and click Authorize -> Grant Access to allow the script to read the count of unread messages in your Gmail mailbox.
- Go to File -> Manage Version and click the Save New Version button. Click OK.
- Go to Publish -> Deploy as web app and choose “Anyone, even anonymous” under “Who has access to this app.” Click the Deploy button.
Google Script will now provide you with a unique web URL and that is where people (anyone on the Internet) can view your Gmail counter.
While the above Google Script is basic and only display the unread count, advanced users may actually log this value in a spreadsheet daily (using automated triggers) and build a chart illustrating their email overload. Google Scripts cannot however be embedded inside web pages as IFRAMEs due to save-origin policies.
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory