SuperAPI AI 工具集

recipe-share-doc-and-notify

通用与其它

查看项目

更新于 10-16 06:52

技能介绍

用途:把一份 Google Docs 文档以编辑(writer)权限分享给指定协作者,并用 Gmail 把文档链接邮件通知对方。

前置条件:执行该配方前需加载 gws-drive、gws-docs、gws-gmail 三个技能。

主要步骤:

  1. 查找文档,使用 gws drive files list 按名称和 MIME 类型筛选,例如:gws drive files list --params '{"q": "name contains '''Project Brief''' and mimeType = '''application/vnd.google-apps.document'''"}'
  2. 授予编辑权限,使用 gws drive permissions create,指定 fileId 与角色,例如:gws drive permissions create --params '{"fileId": "DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "reviewer@company.com"}'
  3. 发送邮件通知,使用 gws gmail +send,例如:gws gmail +send --to reviewer@company.com --subject 'Please review: Project Brief' --body 'I have shared the project brief with you: https://docs.google.com/document/d/DOC_ID'

适用场景:需要把 Google Docs 文档交给他人审阅或协作编辑,并同步邮件告知链接时。

限制:资料未提供权限范围、配额、错误处理、是否支持群组或域外分享等细节;实际使用需替换 DOC_ID、邮箱、文档名等占位内容,并确保已具备相应 Google 账号授权。