Skip to content
Development
Skill

/recipe-label-and-archive-emails

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

From plugin
cli
30k95 skills
Install
$ npx -y skills add googleworkspace/cli --skill recipe-label-and-archive-emails --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/recipe-label-and-archive-emails

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

SKILL.md

recipe-label-and-archive-emails.SKILL.md
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:
        - gws
      skills:
        - gws-gmail

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

Ships withcli

Google Workspace CLI — one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.

Get the whole plugin
Stats
30,285
Stars
1,773
Forks
Active
Maintenance
Rust
Language
Apache-2.0
License
9d ago
Last commit
5mo ago
Created

Repo: googleworkspace/cli