javascript - Google 脚本共享权

标签 javascript google-apps-script

我遇到了 Google 脚本。浏览了他们的 API 并浏览了他们的一些教程。第一个教程创建一个脚本来创建文档并发送电子邮件。如果我将其他人添加到该电子邮件列表中,他们将无法立即查看它。即使我向他们发送了链接,他们也必须请求许可才能查看。

有没有办法在脚本中对此进行编码,以授予通过电子邮件发送链接的人员查看和编辑的权限?

此外,通过 API 并向人们发送电子邮件,他们表明可以使用抄送和密件抄送。 API 示例未展示如何执行此操作。这是我一直在查看的内容:https://developers.google.com/apps-script/defaultservices

谢谢。

最佳答案

Is there a way to have this coded in the script to give rights to the people that are being emailed the link to view and edit?

Document.addEditor() , Document.addEditors() , Document.addViewer()Document.addViewers()让您将权限分配给其他人。

Also, going through the API and emailing people, they show that cc and bcc can be used.

看看MailApp.sendMail(recipient, subject, body, options) ,了解码成选项的“高级参数”的描述。选项对象可能包含 ccbcc 成员。

关于javascript - Google 脚本共享权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14134207/

相关文章:

javascript - 检索文档数据,其中条件值是子集合值

google-apps-script - 如何在 google apps 脚本中使用 DeveloperMetadataVisibility 枚举?

javascript - 同步独立的电子表格行,由 IMPORTRANGE() 填充

google-apps-script - 如何在 ScriptDB 数据库中查询键 :values within objects nested in array objects Google Apps Script

javascript - 如何下载包含javascript代码查找结果的网站?

javascript - 在其他情况下如何忽略循环

javascript - 异常 : The blob format is unsupported. Google 应用程序脚本

google-apps-script - 部署 Google 应用脚本以在未经用户授权的情况下运行

javascript - 根据右键单击的 DOM 元素的 ID 创建动态菜单

javascript - 传递给 JavaScript 函数的数组变量变得未定义