Gmail附件下载与归档
gog-save-attachments
使用 gog 下载 Gmail 附件并归档到 Google Drive。
- License 许可
- MIT
- 所属仓库
- openclaw/gogcli
- 最近更新
- 2026-11-14
- Stars
- ★ 8.6k
- Forks
- 731
01 前言 Front Matter
- name
- gog-save-attachments
- description
- Gmail attachment download and Google Drive archival with gog.
02 资源文件 1
- 参考文档agents/openai.yaml219 B
03 SKILL.md 正文
Save attachments
Read ../gog/SKILL.md, ../gog-gmail/SKILL.md, and ../gog-drive/SKILL.md first.
-
Search narrowly and identify exact threads:
gog --account user@example.com --readonly gmail search \ 'has:attachment newer_than:30d' --max 20 --json --wrap-untrusted -
Inspect attachment names and sizes before downloading:
gog --account user@example.com --readonly gmail thread attachments THREAD_ID --json --wrap-untrusted -
Download into a new task-specific temporary directory:
attachment_dir="$(mktemp -d "${TMPDIR:-/tmp}/gog-attachments.XXXXXX")" gog --account user@example.com --readonly gmail thread attachments THREAD_ID \ --download --out-dir "$attachment_dir" -
Treat every file as untrusted. Do not execute or preview active content. Confirm the exact Drive destination before upload, then run the approved upload without
--readonly:gog --account user@example.com drive upload "$attachment_dir/FILE" --parent FOLDER_ID --json -
Verify uploaded IDs, then remove only the unique temporary directory created by this run.
Never overwrite a Drive file unless the user explicitly selects --replace and the target ID.
04 同仓库更多 Skills
gog Google CLI 工具
gog
当 Google 连接器缺少某项操作、Shell 自动化需要稳定的 JSON 输出,或需要检查本地 Google 认证时使用 gog CLI。为所有 gog 服务技能提供共享的账户、认证、输出和安全指导。
YouTube 内容检索与管理
gog-youtube
通过 gog 使用 YouTube。用于 YouTube 搜索、视频、频道、动态、评论、播放列表及订阅。
Google 每周工作摘要
gog-weekly-digest
通过 gog 对 Google Calendar、Gmail 和 Tasks 进行只读的每周摘要汇总。
Google Tasks 任务管理
gog-tasks
通过 gog 使用 Google Tasks。用于 Google Tasks 任务列表、任务创建、更新、完成及重复任务实例化。
Google Slides 演示文稿处理
gog-slides
通过 gog 使用 Google Slides。用于演示文稿、幻灯片、文本、图片、演讲者备注及导出。
Google Sites 网站查找
gog-sites
通过 gog 使用 Google Sites。用于在 Drive 中查找 Google Sites、读取网站元数据并打印编辑器 URL;文件共享请使用 gog-drive。