Skip to content
Skillpedia
Automations32k · #9230

recipe-label-and-archive-emails

What it does

This tool organizes your Gmail emails. It applies labels (like categories) and removes emails from your main inbox, keeping it clean.

When to use it

  • ✓When you get many emails from a specific sender.
  • ✓To separate notification emails from other important ones.
  • ✓To keep your inbox organized automatically.

Skill link

https://github.com/googleworkspace/cli/blob/main/skills/recipe-label-and-archive-emails/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/recipe-label-and-archive-emails/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Organize my emails from sender 'notifications@service.com' with the label 'Notifications' and archive them.”

5 new skills a week. 1 minute to read.

How it works

The tool searches for emails from a specific sender. Then, it adds a label you choose and removes the email from your main inbox.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Label and Archive Gmail Threads

PREREQUISITE: Load the following skills to execute this recipe: gws-gmail

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

Steps

  1. Search for matching emails: gws gmail users messages list --params '{"userId": "me", "q": "from:notifications@service.com"}' --format table
  2. Apply a label: gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"addLabelIds": ["LABEL_ID"]}'
  3. Archive (remove from inbox): gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"removeLabelIds": ["INBOX"]}'
FAQ

Do I need to have Gmail installed?

Yes, this tool works with your Gmail account.

What are labels in Gmail?

Labels are like folders or categories you can use to organize your emails. They help you find messages more easily.

What does it mean to 'archive' an email?

Archiving an email removes it from your main inbox, but it's still saved in your account and can be found later.

Details

Original description by the author

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

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#9230
License
Apache-2.0
Updated
10/6/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills