Google Apps Script: Setting color of an event using Calendar API

后端 未结 4 1707
感情败类
感情败类 2021-01-14 14:55

I would like to set specific colors for events.

I believe I have to use the Calendar API. I cannot figure out how to do this.

The code I am trying is:

4条回答
  •  情书的邮戳
    2021-01-14 15:23

    In my case I'm not creating, but updating existing calendar events, but I think stood be similar.

    event.colorId = filterColorId;
    Calendar.Events.patch(event, 'primary', event.id)
    

    The whole solution can be found here http://isbyr.com/colour-code-google-calendar-events-automatically-using-google-apps-script/

提交回复
热议问题