Skip to content
Back to skills

Recipe Save Email Attachments

ASecurity

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

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 28, 2026
ai-agentsgobash

Works with

  • cli

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add fakoli/fakoli-plugins --skill recipe-save-email-attachments --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Recipe Save Email Attachments?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Recipe Save Email Attachments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fakoli-recipe-save-email-attachments/badge)](https://www.skillsdirectory.com/skills/fakoli-recipe-save-email-attachments)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: recipe-save-email-attachments
description: "Find Gmail messages with attachments and save them to a Google Drive folder."
trigger:
  - keyword: save attachments
  - keyword: email attachments
  - keyword: download attachments
version: 1.0.0
---

# Save Gmail Attachments to Google Drive

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

## When to Use

Use this workflow when the user wants to extract attachments from emails and store them in Drive — e.g., saving client documents, receipts, or reports.

## Workflow

### 1. Search for emails with attachments

```bash
gws gmail users messages list \
  --params '{"userId": "me", "q": "has:attachment ADDITIONAL_QUERY"}' \
  --fields "messages(id)" --format table
```

### 2. Get message details

For each message, retrieve attachment metadata:

```bash
gws gmail users messages get \
  --params '{"userId": "me", "id": "MESSAGE_ID"}' \
  --fields "payload.parts(filename,body,mimeType)"
```

### 3. Download attachments

```bash
gws gmail users messages attachments get \
  --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'
```

### 4. Upload to Drive

```bash
gws drive +upload --file ./ATTACHMENT_FILENAME --parent FOLDER_ID
```

### 5. Report results

Tell the user which files were saved and where.

## Tips

- Use specific search queries to narrow down: `from:client@example.com has:attachment after:2026/01/01`
- Attachment data is base64-encoded — you may need to decode before uploading
- For large batches, process one message at a time to avoid errors

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.