Skip to main content

recipe-label-and-archive-emails

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

Source facts

Repository
googleworkspace/cli
Last source activity
March 31, 2026 at 18:32
Detected SKILL.md language
English
Stars
31,534
Forks
1,908

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
recipe-label-and-archive-emails
description
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
metadata
{"version":"0.22.5","openclaw":{"category":"recipe","domain":"productivity","requires":{"bins":"[Truncated]","skills":"[Truncated]"}}}
# 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"]}'`
View on GitHub