gog-save-attachments
Gmail attachment download and Google Drive archival with gog.
- 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
Use the gog CLI when Google connectors lack an operation, shell automation needs stable JSON, or local Google auth needs inspection. Shared account, auth, output, and safety guidance for all gog service skills.
gog-youtube
YouTube through gog. Use for YouTube search, videos, channels, activities, comments, playlists, and subscriptions.
gog-weekly-digest
Read-only weekly digest across Google Calendar, Gmail, and Tasks with gog.
gog-tasks
Google Tasks through gog. Use for Google Tasks lists, task creation, updates, completion, and materialized repeats.
gog-slides
Google Slides through gog. Use for presentations, slides, text, images, speaker notes, and exports.
gog-sites
Google Sites through gog. Use for finding Google Sites in Drive, reading site metadata, and printing editor URLs; use gog-drive for file sharing.