I'd like to be able to programmatically change the color of calendar events. I was going through this documentation, but don't understand what the "key" is referring to here: https://developers.google.com/google-apps/calendar/v3/reference/colors. Is it the event ID?
I'd also like to know if it's possible to change a calendar event color via a spreadsheet. I have a script to add entries from a spreadsheet to a calendar, but I want to be able to define the colors as well. Please point me to helpful reading material or examples if possible.
Edit 12/20/2015- added working script to add events:
function createEvent() {
var calendarId = 'MY_ID';
var event = {
summary: 'test',
description: 'test desc',
"end": {
"date": "2015-12-21"
},
"start": {
"date": "2015-12-21"
},
colorId: 10
};
event = Calendar.Events.insert(event, calendarId);
Logger.log('Event ID: ' + event.getId());
}