使用 Google 表单以编程方式共享 Google 站点的编辑权限(半 Public Wiki)

Programmatically Share Editing Rights of Google Site using a Google Form (Semi-Public Wiki)

我有一个现有的(经典)Google 站点,我想将其作为半 public wiki。 Google 似乎已明确禁止 public 新版网站中的维基,因此我正在尝试寻找解决方法。

这是我的理想流程:

1. Guest visits my Google site "Foo Wiki" and clicks a link to become a contributor.

2. Link goes to my Google Form "Registration Form" that just asks for
   a name and email address.

3. Form submission creates a new line in a google sheet "Registration List".

4. "Registration List" has a script that emails the user's given email address 
    giving them editing rights to "Foo Wiki"

这可能吗?

我已经完成了简单的部分 (1-3),但不确定如何进行第 4 步。

我认为您可以使用 addEditor() api.

轻松完成此操作

请检查一下https://developers.google.com/apps-script/reference/sites/site#addEditor(User)

其实比我想象的还要简单!我通过电子邮件向我拥有的另一个电子邮件地址发送了第二个编辑邀请,并将接受邀请 link 复制到我的网站上。