# Recipe Save Email Attachments > Find Gmail messages with attachments and save them to a Google Drive folder. Source: https://skillsagentes.com/skills/googleworkspace/cli/recipe-save-email-attachments Repository: https://github.com/googleworkspace/cli Author: googleworkspace License: Apache-2.0 Updated: hace 4 meses Context cost: 19 tok installed, 262 tok once triggered, 262 tok with every bundled file Bundle: 1 file, 1 KB Permissions requested: none declared ## Install ```bash npx -y skills add googleworkspace/cli --skill recipe-save-email-attachments --agent claude-code ``` ## What it does - Busca mensajes de Gmail que tengan archivos adjuntos - Obtiene los detalles del mensaje y del adjunto - Descarga el adjunto localmente - Sube el archivo descargado a una carpeta de Google Drive ## Use it when - Necesitas guardar adjuntos de correos de Gmail en Google Drive ## What triggers it - "Guarda los adjuntos de los correos de client@example.com en mi carpeta de Drive" - "Busca emails con archivos adjuntos y súbelos a Google Drive" ## Before you install - Requiere el binario `gws` y las skills `gws-gmail` y `gws-drive` cargadas. ## Files - SKILL.md — 1 KB ## SKILL.md Reproduced verbatim from googleworkspace/cli under Apache-2.0. This section is the upstream document and is in English. # 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:client@example.com"}' --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` --- Skills Agentes — https://skillsagentes.com/skills/googleworkspace/cli/recipe-save-email-attachments