Building a gsuite calendar conferencing addon and trying to create an onEventUpdate trigger using following snippet to sync event data back tp conferencing system

  var trigger = ScriptApp.newTrigger('syncEvents')
      .forUserCalendar(calendarId)
      .onEventUpdated()
      .create();

But get an "Exception: We're sorry, a server error occurred. Please wait a bit and try again"

Works though if run code via a test function.

Could I be missing a scope? have the following scopes in manifest file:

  "oauthScopes": [
    "https://www.googleapis.com/auth/userinfo.email", 
    "https://www.googleapis.com/auth/gmail.addons.execute", 
    "https://www.googleapis.com/auth/calendar",
    "https://www.googleapis.com/auth/calendar.readonly",
    "https://www.googleapis.com/auth/calendar.events",
    "https://www.googleapis.com/auth/calendar.events.readonly",
    "https://www.googleapis.com/auth/calendar.addons.execute", 
    "https://www.googleapis.com/auth/calendar.addons.current.event.read", 
    "https://www.googleapis.com/auth/calendar.addons.current.event.write", 
    "https://www.googleapis.com/auth/script.external_request",
    "https://www.googleapis.com/auth/script.scriptapp",
    "https://www.google.com/calendar/feeds"
  ],
1

There are 1 best solutions below

0
On

It seems like this issues has been already reported to google in this post. I would strongly suggest to explain your problem there so it can be taken into account.