Google Apps Script to monitor an email box and send notifications

googlemail-128

Here’s the scenario: you have a second gmail account that gets email infrequently, but you need to monitor it.  For whatever reason (company policy, in my case), you can’t forward the email to your main account.

I discovered that I could log into the second Google account and attach a Google Apps Script to a spreadsheet.  The script monitors the gmail account for unread threads.  If it finds any, it sends a message to my main account.  The script has a time-driven trigger that can be set to run as frequently or infrequently as desired.

To use the script, get the spreadsheet template from my template page.  Open the spreadsheet and edit the cells that contain the email message parameters.  Then go to Tools – Script editor.  Choose Resources – Current project’s triggers.  Add a time-driven trigger that runs the script as often as you’d like.

Email Notifier trigger

Leave a Reply

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