The Google Calendar API provides support for reminders and notifications.
- Reminders are alarms triggered at a specified time before an event starts.
- Notifications allow users to find out about changes to events in their calendar.
Don't confuse notifications with push notifications, which notify another server of changes to a calendar rather than being delivered to a user.
For more details about notifications in Google Calendar, see Modify Google Calendar notifications.
Reminders
A reminder consists of:
- When to show the reminder, expressed as minutes before the event start time.
- The delivery method to use (see Delivery mechanisms).
Reminders can be specified for whole calendars and for individual events. Users can set default reminders for each of their calendars; these defaults apply to all events within that calendar. However, users can also override these defaults for individual events, replacing them with a different set of reminders.
Default reminders
Reminders are private information, specific to an authenticated user; they're not shared across multiple users. As a result:
- Default reminders are manipulated through the
CalendarListcollection, which contains user-specific calendar metadata. - They're not accessible through the
Calendarscollection, which contains global metadata shared across all users.
Default reminders are also returned when doing an Events list query.
Overriding default reminders
To override default reminders when you create or update an event, set
reminders.useDefault
to false and populate
reminders.overrides
with the new reminder set. Overrides can be set only when useDefault is false,
as shown in the following example:
"reminders": {
"useDefault": false,
"overrides": [
{
"method": "reminderMethod",
"minutes": "reminderMinutes"
}
]
}
To revert to the default set of reminders, perform an update setting
reminders.useDefault
back to true.
Notifications
Calendar supports the following notification types:
- Event creation: A new event is added to one of the user's calendars.
- Event change: The organizer modified an event that the user was invited to.
- Event cancellation: An event that the user was invited to is canceled.
- Attendee response: An attendee changed their response status for an event created by the user.
- Agenda: A list of all the events on the user's calendar, sent at the start of the day.
The user can decide which notifications to enable per calendar and the delivery
method for each notification type. These settings are not shared with other
users. Similar to default reminders, they're accessible through the
CalendarList collection.
To send email notifications to attendees for events that were inserted or
updated with the API, call the
insert or
update method and set
the sendUpdates parameter to "all" or "externalOnly".
Delivery mechanisms
The delivery methods offered by Google Calendar are:
- Pop-up. These are supported on mobile platforms and on web clients.
- Email sent by the server.
The following table shows the supported methods for each reminder or notification type:
| Pop-up | |||
|---|---|---|---|
| Reminders | Default reminders | ✓ | ✓ |
| Override reminders | ✓ | ✓ | |
| Notifications | Event creation | ❌ | ✓ |
| Event change | ❌ | ✓ | |
| Event cancellation | ❌ | ✓ | |
| Attendee response | ❌ | ✓ | |
| Agenda | ❌ | ✓ |