Skip to content Skip to sidebar Skip to footer

Changing Color On Event In Google Calendar

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 an

Solution 1:

This is a bit tricky... but I found how it works :

function ChangeEventColor(){
  var calendarId = 'primary';
  var eventId = 'omv°°°°°°°°°°8jbs'varevent = Calendar.Events.get(calendarId, eventId)
  Logger.log('current color = '+event.colorId)
  event.colorId = 11
  Calendar.Events.patch(event,calendarId,eventId);
  Logger.log('new color = '+event.colorId)
}

This post (anonymous) was very helpful

Post a Comment for "Changing Color On Event In Google Calendar"