Im trying to use the advanced calendar service in Google Apps Script to change the colorId on a particular event in my calendar.
So far i have been able to list and get event's and the event i like. So i have the ID of the event.
function getSpecificEvent(){
var calendarId = 'primary';
var eventId = '7h2tbvns2oo4r5gku6ghjfjclk';
var calEvent = Calendar.Events.get(calendarId, eventId);
Logger.log(calEvent);
}
This is what im trying when editing the colorID, i use patch:
function setEventColor(){
var calendarId = 'primary';
var eventId = '7h2tbvns2oo4r5gku6ghjfjclk';
Calendar.Events.patch(calendarId, eventId).colorId('11');
}
Line 33 in this case is this line:
Calendar.Events.patch(calendarId, eventId).colorId
This is a bit tricky... but I found how it works :
This post (anonymous) was very helpful