【问题标题】:Google Drive Notification In Google Apps ScriptGoogle Apps 脚本中的 Google Drive 通知
【发布时间】:2019-09-30 14:38:19
【问题描述】:

当我通过电子邮件将编辑器(此处为组)添加到文件夹类时,我在 Google Apps 脚本中编写了一个脚本。

问题是这个方法给这个组里的每个人发送通知,我可以删除通知吗?

【问题讨论】:

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


【解决方案1】:

使用 DriveApp,电子邮件通知始终开启且无法更改。 Google 甚至在他们的Issue Tracker 上提出了一项功能请求,要求这样做 - 如果你给它一个星,你可以让他们知道更多人想要这个功能。

编辑: 如果您想使用云端硬盘高级服务或只需要共享特定的文档或表格,The question Sourabh Choraria linked 也有一些很好的解决方法。

【讨论】:

    【解决方案2】:

    感谢启用了 Google 高级服务(Drive API),您可以这样做:

    Drive.Permissions.insert(
      {
        'role': 'writer',
        'type': 'user',
        'value': 'user@email.com'
      }, ClassFile.getId(),
      {
        'sendNotificationEmails': 'false'
      });
    

    为此:

    在脚本编辑器中,选择资源 > 高级 Google 服务...

    并启用 Drive API:

    Enabling Drive API Advanced Service

    【讨论】:

      猜你喜欢
      • 2014-03-05
      • 1970-01-01
      • 2016-05-26
      • 1970-01-01
      • 1970-01-01
      • 2015-07-10
      • 1970-01-01
      • 2013-03-09
      • 1970-01-01
      相关资源
      最近更新 更多