
Recipe Label And Archive Emails
Search Gmail for noisy senders, apply labels, and archive threads so your inbox stays actionable while an agent runs repeatable gws commands.
Overview
recipe-label-and-archive-emails is an agent skill most often used in Grow (also Operate, Build) that labels matching Gmail messages and archives them off the inbox using gws gmail users messages list and modify.
Install
npx skills add https://github.com/googleworkspace/cli --skill recipe-label-and-archive-emailsWhat is this skill?
- OpenClaw productivity recipe requiring gws-gmail and the gws binary
- Step 1: messages list with Gmail search query via gws
- Step 2: messages modify to addLabelIds for categorization
- Step 3: messages modify removeLabelIds INBOX to archive without deleting
- Table-formatted list output for inspecting matching messages before modify
- Three documented steps: list, add label, archive via remove INBOX
- Recipe metadata version 0.22.5 with prerequisite gws-gmail skill
- Uses gws gmail users messages list and modify with JSON addLabelIds and removeLabelIds
Adoption & trust: 15.6k installs on skills.sh; 26.9k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Automated and vendor email keeps refilling your inbox even though you only need those threads labeled and out of the way.
Who is it for?
Founders using gws who want agent-run, auditable Gmail triage for repeat offenders like notifications@ addresses.
Skip if: Bulk destructive deletes, complex filter DSL migration, or anyone without gws-gmail setup and label IDs resolved.
When should I use this skill?
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
What do I get? / Deliverables
Matching messages carry your chosen label and no longer sit in INBOX after gws modify calls, keeping Gmail searchable without unread clutter.
- Table listing of messages matching query
- Labeled threads with INBOX removed for archived items
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Inbox triage compounds during growth and ongoing operations; this recipe is shelved under Grow/support because it keeps customer and notification mail from drowning founder responses. Label-and-archive is operational inbox hygiene—supporting you and users—rather than SEO, analytics, or core product build work.
Where it fits
Route SaaS notification emails to a Notifications label and archive so user support threads surface in INBOX.
After wiring a new service, archive its alert mail automatically while preserving labeled history for debugging.
How it compares
Explicit gws modify recipe instead of guessing Gmail UI filter equivalents or one-off chat instructions without message IDs.
Common Questions / FAQ
Who is recipe-label-and-archive-emails for?
Solo builders and tiny teams on Gmail who already use gws and want stepwise label-and-archive automation an agent can repeat.
When should I use recipe-label-and-archive-emails?
In Grow/support when notification mail buries customer threads; in Operate when tightening ops inboxes; in Build when vendor CI emails interrupt focus—after loading gws-gmail.
Is recipe-label-and-archive-emails safe to install?
Review the Security Audits panel on this Prism page; modifying labels touches live mail—test on one MESSAGE_ID and confirm LABEL_ID before batching list results.
Workflow Chain
Requires first: gws gmail
SKILL.md
READMESKILL.md - Recipe Label And Archive Emails
# 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"]}'`