【问题标题】:Create Out of office calendar events with Google Script Api that auto decline meetings使用自动拒绝会议的 Google Script Api 创建外出日历事件
【发布时间】:2019-07-10 14:33:35
【问题描述】:

在 Google 日历中,可以创建一个“不在办公室”活动,该活动会自动拒绝未来对已设置活动的所有邀请。

我正在尝试使用 Google 脚本 API 创建此类事件,但不知何故我无法做到。

到目前为止,我一直在写这个:

function createOutOfOffice(date){
  var startDate = new Date(date);
  startDate.setHours(0,0,0,0);
  var endDate = new Date(startDate);
  endDate.setDate(startDate.getDate() + 1);

  var outOfOffice = CalendarApp.createEvent('Out of office', startDate, endDate);
  outOfOffice.setVisibility(CalendarApp.Visibility.PUBLIC);
  outOfOffice.removeAllReminders();
}

但它不会创建真正的“外出”事件,而是会生成一个很好的旧全天事件:

我显然遗漏了一些东西,因为我创建的活动不会自动拒绝会议。

阅读api documentation,我没有发现任何明显的东西可以帮助我实现我想要的。 使用 Google App Scripts 甚至可以远程执行此操作吗?

【问题讨论】:

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


    【解决方案1】:

    外出活动是 Google 日历的一项相当新的功能,因此很遗憾,它尚未在 Google Apps 脚本或 Google API 中实现。您可以看到 here 已经在 Issuetracker 上提交了相应的功能请求。您可以给它一个星以增加可见度,以便该功能有望尽快实施。

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2017-01-28
      • 2011-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多