calendar from apps script : every time authorized required. Only work with primary calendar

后端 未结 1 1818
野性不改
野性不改 2021-01-27 01:49

In a spreadsheet, I have a app script for count hours in a google calendar and the output is copied in the spreadsheet.

A few days ago, anything worked fine.

but

相关标签:
1条回答
  • 2021-01-27 02:18

    finally I changed the access to calendar API to CalendarApp service with .getEvents

    var cal = CalendarApp.getCalendarById(cal_id);
    var this_year = new Date(2013,0,1);
    var now = new Date()
    var events = cal.getEvents(this_year, now, {search: event_name});
    
    0 讨论(0)
提交回复
热议问题