Google脚本-创建日历并分享给我

时间:2020-06-22 12:51:02

标签: google-apps-script google-calendar-api google-calendar-reminders

我的目标是创建一个脚本,用户可以从共享的Sheets文件中运行该脚本。该脚本旨在为每个用户创建日历并将其共享给我,以便以后可以使用此新日历ID推送事件。如果可能的话,我还要在此脚本运行期间设置全天通知。 这是我当前的代码:

function create_calendar_share_back_to_me {
 var calendar = CalendarApp.createCalendar('test1', {
  summary: 'A calendar to store all CRM automated events',
});
Logger.log('Created the calendar "%s", with the ID "%s".',
    calendar.getName(), calendar.getId()); 
}

如您所见。我被困在共享部分:) 当然,我将首先在计算机上运行此命令以提供权限。这是否足以允许域中的所有其他用户运行此脚本并在其自己的用户(不是我的用户)下创建此日历? 谢谢

0 个答案:

没有答案