Closed bonelifer closed 2 years ago
Managed to get it done by changing "isAllDay" to this. Anyone looking here later you'll need to get your calendar id and replace the text below with it. Thanks for this script, really helps with managing my doctors appointments.
if (isAllDay) {
var event = CalendarApp.getCalendarById('<YOURCALENDARID>@group.calendar.google.com').createAllDayEvent(...calPayload)
} else {
var event = CalendarApp.getCalendarById('<YOURCALENDARID>@group.calendar.google.com').createEvent(...calPayload)
}
Logger.log('Event Added: ' + eventTitle + ', ' + startTime + '(ID: ' + event.getId() + ')');
}
@bonelifer Awesome glad you were able to figure it out! Thanks for posting the solution for others to see as well 👍
It would be convenient to be able to add the event to a specific calendar instead of the default one.