Google Apps Script to monitor an email box and send notifications


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, make a copy of this spreadsheet.  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

2 thoughts on “Google Apps Script to monitor an email box and send notifications

  1. Akshita

    Hi Karl,

    I am not able to find the script. Can you please help me with it?

    You can contact me on my email id:

    1. karl.kranich Post author

      Hi Akshita,
      I hope you see this – the comment system filtered out your email address.

      I edited the post and put in a link to a read-only version of my spreadsheet that contains the apps script. Make a copy of the spreadsheet, and then you should be able to run it.



Leave a Reply

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