自动化32k · #9191
gws-workflow-file-announce
它能做什么
这个命令会在 Google Chat 空间里发一条消息,用来宣布一个 Google Drive 文件。它会使用文件 ID 和空间名称来完成这次宣布。
适用场景
- ✓当你希望团队看到一份重要的新文档时。
- ✓当你想快速把一份工作文件分享给特定小组时。
- ✓当你更新了某份文档,想通知相关人员时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-file-announce/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-file-announce/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-workflow-file-announce
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-workflow-file-announce/SKILL.md -o SKILL.md
可以这样问 AI
“请在“My Team”空间中宣布文件“XYZ123”。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供 Google Drive 文件 ID 和 Google Chat 空间名称。工具会获取文件名称,并替你生成宣布消息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
workflow +file-announce
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Announce a Drive file in a Chat space
Usage
gws workflow +file-announce --file-id <ID> --space <SPACE>
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--file-id |
✓ | — | Drive file ID to announce |
--space |
✓ | — | Chat space name (e.g. spaces/SPACE_ID) |
--message |
— | — | Custom announcement message |
--format |
— | — | Output format: json (default), table, yaml, csv |
Examples
gws workflow +file-announce --file-id FILE_ID --space spaces/ABC123
gws workflow +file-announce --file-id FILE_ID --space spaces/ABC123 --message 'Check this out!'
Tips
- This is a write command — sends a Chat message.
- Use
gws drive +uploadfirst to upload the file, then announce it here. - Fetches the file name from Drive to build the announcement.
See Also
- gws-shared — Global flags and auth
- gws-workflow — All cross-service productivity workflows commands
常见问题
使用这个命令前,我需要先做什么吗?
需要。你要先拿到想要宣布的 Google Drive 文件 ID。如果文件还没上传,可以先使用 `gws drive +upload` 命令。
我可以添加自定义消息吗?
可以。你可以使用 `--message` 选项,在公告中加入额外的说明。
在哪里可以找到 Google Drive 文件 ID?
文件 ID 位于 Google Drive 链接中“/d/”之后、“/edit”或“/view”之前的那一段。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9191
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …