Skip to content
Back to skills

Recipe Label And Archive Emails

ASecurity

Apply Gmail labels to matching messages and archive them to keep your inbox clean.

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

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add fakoli/fakoli-plugins --skill recipe-label-and-archive-emails --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Recipe Label And Archive Emails?

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

Security grade badge for Recipe Label And Archive Emails
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fakoli-recipe-label-and-archive-emails/badge)](https://www.skillsdirectory.com/skills/fakoli-recipe-label-and-archive-emails)

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-label-and-archive-emails
description: "Apply Gmail labels to matching messages and archive them to keep your inbox clean."
trigger:
  - keyword: label emails
  - keyword: archive emails
  - keyword: organize inbox
version: 1.0.0
---

# Label and Archive Gmail Threads

Apply Gmail labels to matching messages and archive them to keep your inbox clean.

## When to Use

Use this workflow when the user wants to organize their inbox — label emails from a specific sender/subject and move them out of the inbox.

## Workflow

### 1. Find matching emails

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

Ask the user for the search criteria (sender, subject, keywords).

### 2. Find or create the target label

List existing labels:

```bash
gws gmail users labels list --params '{"userId": "me"}' --format table
```

Create a new one if needed:

```bash
gws gmail users labels create --params '{"userId": "me"}' --json '{"name": "LABEL_NAME"}'
```

### 3. Apply label and archive

For each message:

```bash
gws gmail users messages modify \
  --params '{"userId": "me", "id": "MESSAGE_ID"}' \
  --json '{"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}'
```

### 4. Report results

Tell the user how many messages were labeled and archived.

## Tips

- `"removeLabelIds": ["INBOX"]` is what archives the message
- You can apply multiple labels at once: `"addLabelIds": ["LABEL_1", "LABEL_2"]`
- Consider suggesting a Gmail filter (recipe-create-gmail-filter) for ongoing automation

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.