Changing Color on Event in Google Calendar

后端 未结 1 1235
孤独总比滥情好
孤独总比滥情好 2021-01-21 00:25

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

相关标签:
1条回答
  • 2021-01-21 00:46

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

    function ChangeEventColor(){
      var calendarId = 'primary';
      var eventId = 'omv°°°°°°°°°°8jbs'
      var event = 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

    0 讨论(0)
提交回复
热议问题