Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the Google Calendar connector page.

Automatic notification channels

StackOne creates and manages the Google Calendar notification channels automatically when the account is connected, and stops them when the account is disconnected. You don’t need to set anything up in Google Calendar or the Google Cloud Console.

1

Select events in StackOne

Enable the webhook events you want on the Google Calendar connector in StackOne. Google Calendar watches one collection per notification channel, so StackOne creates one channel for each selected event.

2

Check scope requirements

Each event needs read access to the collection it watches. The connector’s default scope, https://www.googleapis.com/auth/calendar, covers every event. If you set narrower scopes on the StackOne Connector profile, include at least one of these per event:

  • Events Changed: https://www.googleapis.com/auth/calendar.events.readonly, https://www.googleapis.com/auth/calendar.events or https://www.googleapis.com/auth/calendar.readonly
  • ACL Changed: https://www.googleapis.com/auth/calendar.acls.readonly or https://www.googleapis.com/auth/calendar.acls
  • Calendar List Changed: https://www.googleapis.com/auth/calendar.calendarlist.readonly, https://www.googleapis.com/auth/calendar.calendarlist or https://www.googleapis.com/auth/calendar.readonly
  • Settings Changed: https://www.googleapis.com/auth/calendar.settings.readonly or https://www.googleapis.com/auth/calendar.readonly
3

Reconnect to renew expired channels

Google ends every notification channel 30 days after it is created, and StackOne does not create replacements on its own. When events stop arriving, reconnect the account in StackOne Hub. StackOne stops the old channels and creates new ones for the selected events.

Available webhook events

The following Google Calendar events can be enabled. Only events selected in StackOne get a notification channel, and Google Calendar does not deliver changes for collections that are not watched.

1

Calendar events

Events on the connected user’s primary calendar.

  • Events Changed (events.changed) — Fired when an event on the user’s primary calendar is created, updated, or deleted
  • ACL Changed (acl.changed) — Fired when a sharing rule on the user’s primary calendar is created, updated, or deleted
2

User events

Events on the connected user’s calendar list and settings.

  • Calendar List Changed (calendarList.changed) — Fired when a calendar is added to, changed in, or removed from the user’s calendar list
  • Settings Changed (settings.changed) — Fired when one of the user’s Google Calendar settings changes

Delivery format

Details of how Google Calendar delivers events to StackOne.

1

Notifications carry no change details

Google Calendar notifications have no body. Each one says only that the watched collection changed; it does not say which item changed or how. Fetch the changes with the matching list action.

  • Events Changed: call list_events on the primary calendar with a syncToken.
  • ACL Changed: call list_acl on the primary calendar.
  • Calendar List Changed: call list_calendar_list with a syncToken.
  • Settings Changed: call list_settings with a syncToken.
2

Primary calendar only

Events Changed and ACL Changed watch the user’s primary calendar. Changes on secondary or shared calendars are not delivered.

3

Event payload

Each event’s ID combines the channel ID and Google’s message number (channelId:messageNumber). The event data holds the notification headers: resource state, channel ID, resource ID, resource URI, message number, and the channel’s expiry date.

  • Google does not guarantee delivery of every notification, so run a periodic sync as a fallback.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.