跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

recipe-share-doc-and-notify · 共享 Google 文档并邮件通知协作者

通过 gws 命令行查找 Google Docs 文档,授予指定用户编辑权限,再用 Gmail 发送含文档链接的通知邮件。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

查找名为 Project Brief 的文档,给 reviewer@company.com 授予 writer 权限,并发送主题为“Please review: Project Brief”的邮件附上链接。

输出

预期交付:文档编辑权限设置结果与已发送的通知邮件。(编辑说明,非实际运行结果)

方法说明

---
name: recipe-share-doc-and-notify
description: "Share a Google Docs document with edit access and email collaborators the link."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-drive
        - gws-docs
        - gws-gmail
---

# Share a Google Doc and Notify Collaborators

> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-drive`, `gws-docs`, `gws-gmail`

Share a Google Docs document with edit access and email collaborators the link.

## Steps

1. Find the doc: `gws drive files list --params '{"q": "name contains '\''Project Brief'\'' and mimeType = '\''application/vnd.google-apps.document'\''"}'`
2. Share with editor access: `gws drive permissions create --params '{"fileId": "DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "reviewer@company.com"}'`
3. Email the link: `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'`