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

Skill · 已公开版本

recipe-share-folder-with-team · 共享 Google Drive 文件夹给团队

按名称查找 Google Drive 文件夹,为指定协作者分别授予编辑或查看权限,并列出权限以核对结果。

先看看示例

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

输入

把名为 Project X 的文件夹共享给同事为编辑、给相关方为只读,并确认权限设置正确。

输出

预期交付:已更新的文件夹权限列表,可用表格形式核对各协作者角色。(编辑说明,非实际运行结果)

方法说明

---
name: recipe-share-folder-with-team
description: "Share a Google Drive folder and all its contents with a list of collaborators."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-drive
---

# Share a Google Drive Folder with a Team

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

Share a Google Drive folder and all its contents with a list of collaborators.

## Steps

1. Find the folder: `gws drive files list --params '{"q": "name = '\''Project X'\'' and mimeType = '\''application/vnd.google-apps.folder'\''"}'`
2. Share as editor: `gws drive permissions create --params '{"fileId": "FOLDER_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "colleague@company.com"}'`
3. Share as viewer: `gws drive permissions create --params '{"fileId": "FOLDER_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "stakeholder@company.com"}'`
4. Verify permissions: `gws drive permissions list --params '{"fileId": "FOLDER_ID"}' --format table`