Labsco
googleworkspace logo

recipe-label-and-archive-emails

✓ Official29,400

by Google · part of googleworkspace/cli

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

🔥🔥✓ VerifiedFreeQuick setup
🧰 Not standalone. This skill ships with googleworkspace/cli and only works together with that tool — install the tool first, then add this skill.

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

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.


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