Automating Your Google Calendar Notifications

If you’re like me, you like to customize everything. I’m also constantly in meetings, busy focused on a few different things at one time and will easily forget about a meeting if the notification is too far in advance.

For me, the default value of 10 minutes from Google is a bit too long. Additionally, I don’t like having to consistently edit each calendar event to add or edit new notifications.

So, if any of that sounds like you…check out this script below.

First: if you are unfamiliar with how to access/enable Google Apps Script, see immediately below. If you are familiar, skip to the Script section.

Accessing/Enabling Google Apps Script

  1. Within your Google Drive, click the “New” button and then over “More”2017-06-19 15_11_36-My Drive - Google Drive

2. If you you already have Google Apps Script enabled/added, you’ll see it in the new box.

2017-06-19 15_14_12-My Drive - Google Drive

3. If not, click “connect more apps”,  type “script” into the search box and then click “+ connect” (mine says “rate it” since I’ve already enabled the script).

2017-06-19 15_14_35-My Drive - Google Drive

Creating Your Calendar Automation Script

1. Create a new Script file by following steps 1 & 2 above.

2. Rename your script file to something that makes sense. I used “Calendar Notification Script”

3. Copy and Paste the code below into the IDE.

function calendarNotificationDefault () {

var myCalendar =     CalendarApp.getCalendarById(‘youremail@gmail.com’);
var today = new Date();
var dailyEvents = myCalendar.getEventsForDay(today);

for ( x = 0; x < dailyEvents.length; x++) {
dailyEvents[x].addPopupReminder(5);
};

}

4. Click the “play” button in the toolbar and then allow permissions when allowed.

5. If you want to run this on an automated schedule (I’m currently running it every 1 hour), then adjust your “Project Trigger’s”, which you’ll find under “Edit”.

You should now have a script that will run through all events on a given day and update your calendar notifications to whatever time you’d like. NOTE: The Google Apps Script reference guide states that the minimum notification (popup or sms) must be 5 minutes. However, I’ve successfully had the system set the notification time to 2 minutes.

 

Advertisements

One thought on “Automating Your Google Calendar Notifications

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s