'Unexpected error while getting the method or property create on object ScriptApp.CalendarTriggerBuilder
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.
Solution 1:[1]
Apparently, this is a bug according to this bug report: https://issuetracker.google.com/issues/232107679.
Check there for details.
Solution 2:[2]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | IMTheNachoMan |
Solution 2 | EvalumoLP |