I have code that has always worked but today it is giving me an error. I'm not sure if this is a bug or something else.
function myFunction() {
ScriptApp.newTrigger("calendarUpdatedEvent")
.forUserCalendar(Session.getEffectiveUser().getEmail())
.onEventUpdated()
.create();
}
function calendarUpdatedEvent(e)
{
Logger.log(JSON.stringify(e));
}
Exception: Unexpected error while getting the method or property create on object ScriptApp.CalendarTriggerBuilder.
CodePudding user response:
Apparently, this is a bug according to this bug report: https://issuetracker.google.com/issues/232107679.
Check there for details.
CodePudding user response:
As a workaround, you can create the trigger with the "Add Trigger" button from the Triggers List View instead of programmatically, it seems to work