Save attachments

SkillFiles & storage

Lets your agent download Gmail attachments and save them to Google Drive.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Save attachments skill

About this capability

Gmail attachment download and Google Drive archival with gog.

What this skill tells your AI

The instructions your AI receives, as published by openclaw/gogcli in .agents/skills/gog-save-attachments/SKILL.md and read by ahel’s review.

Read ../gog/SKILL.md, ../gog-gmail/SKILL.md, and ../gog-drive/SKILL.md first.

  1. Search narrowly and identify exact threads:

    gog --account user@example.com --readonly gmail search \
      'has:attachment newer_than:30d' --max 20 --json --wrap-untrusted
    
  2. Inspect attachment names and sizes before downloading:

    gog --account user@example.com --readonly gmail thread attachments THREAD_ID --json --wrap-untrusted
    
  3. 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"
    
  4. 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
    
  5. 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.

Signals

GitHub stars
8k
Forks
690
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
gog-save-attachments
Source
github.com/openclaw/gogcli