google-apps-script – GAS不允许在Team Drive中创建可安装的触发器

我的公司一直在尝试使用G Suite在线移动我们的流程.

出于某种原因,GAS不允许我以可编程方式设置触发器并返回“Exception:Action not allowed”.见下面的截图1-3.

[请求授权] [1] // SO不允许我发布两个以上的链接,这是一个屏幕截图,告诉您脚本需要授权并要求您选择一个帐户.

Allow Access

Action not allowed

最简单的代码:

function myFunction() {
  Logger.log("Trigger created");
}

function createTrigger(){
  ScriptApp.newTrigger("myFunction")
  .forSpreadsheet(SpreadsheetApp.getActive())
  .onEdit()
  .create();//this line wouldn't be executed
}

我到目前为止的观察/尝试是:

>这仅发生在存储在Team Drive中的文件(独立脚本和绑定脚本)中,在My Drive中运行良好
>我可以去编辑 – >当前项目的触发器并手动设置On编辑触发器
>我猜它与域授权有关,但找不到任何有用的信息
>我与谷歌云支持聊天但没有运气.部分回复:

Thank you for contacting G Suite Support. I understand that you are experiencing an issue with Scripts that is not part of the core suite of G Suite services defined at gsuite.google.com/terms/user_features.h.t.m.l.

The issue you’ve experienced is currently outside the scope of our support offering and we won’t be able to offer you further direct assistance at this time.

由于这种情况发生在团队驱动中,我无法提供该文件的链接.

任何帮助将不胜感激.

提前致谢!

最佳答案 Team Drive文件由团队“拥有”,不能由单个用户授权.我没有找到有关如何缓解此问题的新文档,这就是我们仍然在共享Google云端硬盘文件夹中管理基于团队的脚本的原因.

点赞