SkillHub

gmail-label-routing

v1.0.0

Configurar en Gmail el enrutamiento por remitente hacia etiquetas usando el workflow local `scripts/gws_gmail_label_workflow.py`, incluyendo crear/usar etiqueta, crear filtro, aplicar retroactivo y opcionalmente sacar de INBOX. Usar cuando el usuario pida cosas como “manda este remitente a esta etiq...

Sourced from ClawHub, Authored by Luis Alvarado

Installation

Please help me install the skill `gmail-label-routing` from SkillHub official store. npx skills add 1u1s4/gmail-label-routing

Gmail Label Routing

Overview

Estandarizar cambios de etiquetas por remitente en Gmail con un flujo único y consistente. Priorizar el script local para evitar inconsistencias manuales entre filtro, retroaplicación y estado de INBOX.

Workflow

  1. Confirmar intención del usuario:
  2. Etiqueta destino
  3. Uno o varios remitentes
  4. Si debe salir de INBOX (default: sí)
  5. Si debe reemplazar filtros existentes del remitente (solo cuando lo pida o haya conflictos)

  6. Ejecutar el workflow:

python3 scripts/gws_gmail_label_workflow.py 
  --label "<Etiqueta>" 
  --sender "[email protected]" 
  --sender "[email protected]"

scripts/gws_gmail_label_workflow.py es ruta relativa al directorio de esta skill.

  1. Variantes comunes:
  2. Mantener en INBOX: --keep-inbox
  3. Reemplazar filtros del remitente: --replace-sender-filters
  4. Simular sin cambios: --dry-run

  5. Confirmar resultado con el JSON final del script:

  6. createdFilterId
  7. retroApplied
  8. withLabelCount
  9. inboxCount

Rules

  • Repetir --sender por cada remitente.
  • Mantener comillas en etiqueta y remitentes para evitar errores de parsing.
  • Usar --replace-sender-filters cuando haya mezcla por reglas duplicadas para el mismo remitente.
  • Si el usuario dice “haz lo mismo”, repetir el mismo patrón usado: etiqueta + filtro + retroactivo + manejo de INBOX.
  • Si hay fallo de scopes en gws para filtros, usar el fallback ya implementado dentro del workflow (credenciales OAuth locales).

Reference

  • Ver ejemplos listos en references/commands.md.