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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- Search for matching emails:
gws gmail users messages list --params '{"userId": "me", "q": "from:notifications@service.com"}' --format table - Apply a label:
gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"addLabelIds": ["LABEL_ID"]}' - 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
Comments
- …
More skills from this repository
gws-admin-reports
32kHelps your agent get activity reports from Google Workspace. It collects audit and usage data.
gws-calendar-agenda
32kHelps your agent see upcoming events across all calendars. It's useful for organizing your schedule and knowing what's coming up.
gws-calendar-insert
32kLets your agent create new events in Google Calendar. It's useful for scheduling appointments and meetings.
gws-calendar
32kAllows your agent to manage calendars and events. It's useful for organizing your life and work.
Similar skills
knowledge-automation
394kHelps your agent set up a recurring job that brings new content into your Knowledge vault on a schedule, then checks that the job runs.
knowledge-source-ingest
394kHelps your agent keep a Knowledge vault current with new items from chat channels, feeds, or mailboxes, without re-adding what it already has.
benchmark
280kHelps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.