Skip to content

Mulla759/GWSforDummies / .claude/skills/gws-gmail-users-settings-filters-create

gws-gmail-users-settings-filters-create

Verified

Gmail: Create a server-side message filter (rule) that auto-labels matching mail.

gmail users settings filters create

Create a persistent server-side filter. Gmail applies it automatically to matching future mail (and offers to apply to existing matches in the UI). A mailbox can hold at most 1,000 filters.

⚠️ Filters are persistent and silent. Validate with --dry-run first, and prefer label-only actions (addLabelIds) — never auto-archive (removeLabelIds: ["INBOX"]), delete (["TRASH"]), or mark read without explicit user intent.

Usage

gws gmail users settings filters create --params '<JSON_PARAMS>' --json '<JSON_BODY>'

Parameters (--params JSON)

ParameterRequiredDescription
userId✓The user's email address or "me" for the authenticated user

Request Body (--json JSON)

{
  "criteria": { "from": "notifications@github.com" },
  "action": { "addLabelIds": ["Label_42"] }
}

criteria fields (match conditions — combine with AND)

FieldTypeDescription
fromStringSender. Supports *@domain.com and domain.com.
toStringRecipient.
subjectStringSubject contains.
queryStringAny Gmail search query (e.g. "list:newsletters").
negatedQueryStringGmail search query that must NOT match.
hasAttachmentBooleanOnly messages with attachments.

action fields

FieldTypeDescription
addLabelIds[String]Label IDs (not names) to apply. Use labels list.
removeLabelIds[String]Label IDs to remove. Avoid for auto-curation.
forwardStringForwarding address. Do not use for auto-curation.

Examples

# Validate locally first — does not call the API
gws gmail users settings filters create --params '{"userId": "me"}' \
  --json '{"criteria": {"from": "notifications@github.com"}, "action": {"addLabelIds": ["Label_42"]}}' --dry-run

# Create the filter
gws gmail users settings filters create --params '{"userId": "me"}' \
  --json '{"criteria": {"from": "notifications@github.com"}, "action": {"addLabelIds": ["Label_42"]}}'

Tips

  • addLabelIds takes label IDs, not display names. Resolve them with gws gmail users labels list and match on the name field.
  • A sender filter generalizes; key it on the most specific stable criterion (an exact from, or *@domain.com only when the whole domain is consistent).
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall