Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
googleworkspace avatar

Recipe Label And Archive Emails

  • 24.5k installs
  • 30k repo stars
  • Updated July 22, 2026
  • googleworkspace/cli

Label-and-archive-emails is a Google Workspace CLI recipe that applies labels to matching Gmail messages and moves them out of the inbox.

About

Apply Gmail labels to matching messages and archive them to keep the inbox clean. The skill searches for emails matching a query, applies specified labels, and removes them from the inbox folder. Developers use this to automate email organization and management at scale.

  • Search and filter emails by query patterns
  • Apply labels and archive in a single workflow
  • Keeps inboxes organized automatically

Recipe Label And Archive Emails by the numbers

  • 24,486 all-time installs (skills.sh)
  • +810 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #30 of 2,742 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

recipe-label-and-archive-emails capabilities & compatibility

Capabilities
email management · automation · filtering
Works with
gmail
Use cases
email
From the docs

What recipe-label-and-archive-emails says it does

Apply Gmail labels to matching messages and archive them to keep your inbox clean.
SKILL.md
npx skills add https://github.com/googleworkspace/cli --skill recipe-label-and-archive-emails

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs24.5k
repo stars30k
Security audit3 / 3 scanners passed
Last updatedJuly 22, 2026
Repositorygoogleworkspace/cli

How do you label and archive Gmail messages from the CLI?

Developers automate email inbox management and labeling in automated workflow agents.

Who is it for?

Automating email organization and inbox management

Skip if: Developers who need to compose or send new Gmail messages or those without the gws-gmail skill and Gmail API access configured.

When should I use this skill?

A developer asks to auto-label, filter, or archive Gmail notification or transactional messages using gws.

What you get

Labeled Gmail messages moved out of the inbox with matching query filters applied.

  • labeled gmail messages
  • archived inbox threads

By the numbers

  • Recipe metadata version 0.22.5 in googleworkspace/cli
  • Documented example query filter from:notifications@service.com

Files

SKILL.mdMarkdownGitHub ↗

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"]}'

Related skills

FAQ

Which gws commands does recipe-label-and-archive-emails use?

recipe-label-and-archive-emails runs gws gmail users messages list with a q search filter, then applies labels and archives matching messages using subsequent gws gmail users commands documented in the recipe steps.

What prerequisite skill does recipe-label-and-archive-emails need?

recipe-label-and-archive-emails requires the gws-gmail utility skill and the gws binary; the README marks gws-gmail as a mandatory prerequisite before listing or modifying messages.

Is Recipe Label And Archive Emails safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.