Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot official · Google

recipe-save-email-attachments — Claude Code skill: how to install

Searches Gmail messages with attachments and uploads those files directly to a Google Drive folder.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add googleworkspace/cli --skill recipe-save-email-attachments -a claude-code
Open on GitHub

What recipe-save-email-attachments does

This recipe automates a multi-step routine between email and cloud storage. It first queries messages using gws gmail users messages list with filters like has:attachment. After retrieving the target message and attachment IDs, it downloads the file and uploads it directly to Google Drive via gws drive +upload.

The recipe requires the gws CLI executable on your system. It also depends on two companion skills: gws-gmail and gws-drive. Both must be installed for the workflow commands to execute properly.

Install this skill if you frequently route incoming invoices or client documents into Drive. If you only move files once a month, doing it manually takes less effort.

What it helps with

  • search Gmail for messages matching attachment filters
  • download attachment files via message and attachment IDs
  • upload retrieved files directly into a specific Google Drive folder

Example prompts for the agent

  • Find emails from [email protected] with attachments and save them to Google Drive
  • Download the attachment from message MESSAGE_ID and upload it to folder FOLDER_ID

How to install recipe-save-email-attachments

1Skills CLI (Vercel)

npx skills add googleworkspace/cli --skill recipe-save-email-attachments -a claude-code

2Manually: put the files in place

~/.claude/skills/recipe-save-email-attachments/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/recipe-save-email-attachments/

From the same set95

The whole set →
gws-gmail official googleworkspace This skill hands your agent Gmail: send mail, read the inbox, reply in a thread. Useful when email work already runs through the gws CLI. Claude Code CX Codex Cursor +1 81,900installs gws-gmail-send official googleworkspace A skill that teaches your agent to send Gmail from the terminal: recipients, subject, body, attachments and drafts. Claude Code CX Codex Cursor +1 74,700installs gws-drive official googleworkspace This skill hands your agent Google Drive through the gws CLI: files, folders, shared drives, comments and access requests. Useful when docs move through code. Claude Code CX Codex Cursor +1 74,500installs gws-shared official googleworkspace This skill gives agents shared rules for gws CLI authentication, flags, and output formats. Use it when working with gws commands. Claude Code CX Codex Cursor +1 66,000installs gws-calendar official googleworkspace Manage Google Calendar events, access rules, and schedules through the gws CLI tool. Claude Code CX Codex Cursor +1 61,100installs gws-sheets official googleworkspace This skill lets an agent read and edit Google Sheets through the CLI. Use it when a coding workflow needs spreadsheet data or table updates. Claude Code CX Codex Cursor +1 58,800installs gws-docs official googleworkspace This skill lets an agent read and update Google Docs through gws. Use it when document changes should happen from an agent chat. Claude Code CX Codex Cursor +1 58,300installs gws-sheets-read official googleworkspace Reads cell values and sheets from Google Spreadsheets via CLI. Useful when an agent needs spreadsheet data without risk of altering it. Claude Code CX Codex Cursor +1 50,600installs

Similar

Questions about recipe-save-email-attachments

How to install recipe-save-email-attachments in Claude Code?

Run npx skills add googleworkspace/cli --skill recipe-save-email-attachments -a claude-code. The recipe file will be stored in ~/.claude/skills/recipe-save-email-attachments/SKILL.md.

What does recipe-save-email-attachments do?

It orchestrates searching Gmail for messages with attachments, retrieving those files, and uploading them directly into Google Drive folders.

What prerequisites are required before using this recipe?

You need the gws command-line tool installed, along with the gws-gmail and gws-drive skills loaded in your assistant.

Source text

SKILL.md · Apache-2.0
---
name: recipe-save-email-attachments
description: "Find Gmail messages with attachments and save them to a Google Drive folder."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-gmail
        - gws-drive
---

# Save Gmail Attachments to Google Drive

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

Find Gmail messages with attachments and save them to a Google Drive folder.

## Steps

1. Search for emails with attachments: `gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:[email protected]"}' --format table`
2. Get message details: `gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}'`
3. Download attachment: `gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'`
4. Upload to Drive folder: `gws drive +upload --file ./attachment.pdf --parent FOLDER_ID`

© googleworkspace · Apache-2.0 · googleworkspace/cli

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor