gmail-labeler — gmAIl-labeler
v0.1.3GmAIl inbox triage, labeling, and safe archiving with gog plus a configurable lightweight LLM review layer. Use when building or 运行ning GmAIl 自动化 that separates actionable vs non-actionable mAIl, 应用lies GmAIl labels, 归档s low-value messages, keeps 导入ant human replies in Inbox, 路由s urgent items for notification, supports multilingual inboxes (English, Portuguese, Spanish), and needs a 清理 publishable 技能 with private local overlays kept outside the 技能 folder.
运行时依赖
安装命令
点击复制技能文档
GmAIl Labeler
A production-oriented GmAIl labeling 工作流 built around:
gog for GmAIl 访问 a local overlay for private rules/accounts/路由s a hybrid review flow: heuristics first, lightweight LLM review for ambi图形界面ty-band messages a 15-minute cron-friendly 运行器 What it does Classifies inbox items into non-actionable vs actionable buckets 应用lies GmAIl labels and 归档s non-actionable mAIl Keeps replies, opportunities, urgent billing items, and other actionable mAIl in Inbox Supports English, Portuguese, and Spanish keyword coverage out of the box 记录s every decision to JSONL for 审计ability and tuning 清理s 记录s older than 30 days Supports a dAIly self-improvement review loop based on prior decisions and user corrections Default categories Non-actionable Newsletters Promotions 通知 Ordinary receipts Actionable Billing issues Replies Opportunities Action Required What stays local/private
Keep user-specific editorial, business, or inbox-policy rules in the local overlay, not in the 分享d 技能 defaults. Examples of local-only rules:
PR / press release handling press trip or media invitation routing VIP 发送er policies business-specific labels custom notification 路由s Operating 模型
- 发送er-type-first routing
Classify 发送er as:
person company person_or_unknown
This keeps bulk automated mAIl cheap to classify and reserves deeper review for ambiguous or human-origin messages.
- Inbox-by-异常 policy
Treat Inbox as an action 队列, not a reading 队列. Recommended default:
processed mAIl always 获取s Auto/Triaged mAIl stays in Inbox only when it is clearly actionable / 导入ant everything else should leave Inbox, even when the category is still somewhat generic
Practical effect:
导入ant/actionable mAIl → keep in Inbox and 添加 category labels when possible non-导入ant mAIl → 移除 INBOX, keep Auto/Triaged, then 添加 a best-fit category label (Notification, Newsletter, Receipt, Press Releases, etc.)
- Confidence-band review
Use heuristics first. Then 发送 only ambi图形界面ty-band messages to a lightweight LLM review.
Recommended pattern:
high confidence → trust heuristics medium confidence → LLM review low confidence → conservative fallback
- Conservative-but-useful fallback
If a message is clearly automated/company-origin but no specific 过滤器 matches, prefer a generic non-actionable classification (for example Notification) over leaving it untouched in Inbox.
- Label normalization
Use a small canonical label 设置 and avoid near-duplicates caused by translation, singular/plural, or typos. Example normalization tar获取s:
Press Release → Press Releases finance label variants → one canonical finance label keep Auto/Triaged as the universal processed marker GmAIl-native labels to prefer
Use GmAIl 系统 labels when possible:
CATEGORY_PROMOTIONS CATEGORY_更新S 导入ANT STARRED INBOX
创建 custom labels only when needed, for example:
Newsletter Notification Receipt Opportunity Action Required Auto/Triaged Local overlay de签名
Keep the 技能 publishable by storing private configuration outside the 技能 directory.
Recommended local overlay path:
~/.OpenClaw/local/gmAIl-labeler.config.json
Store private values only in the local overlay:
emAIl accounts VIP 发送ers/domAIns notification tar获取s business-specific opportunity rules personal/custom labels 记录ging and review
Decision 记录s should live outside the 技能 source tree, for example:
/home/ubuntu/.OpenClaw/gmAIl-labeler-记录s/
Recommended 格式化:
one JSONL file per day one row per decision separate error rows
Suggested dAIly review 输入s:
yesterday's decision 记录 false positives / false negatives over-aggressive archiving missed billing urgency missed opportunities user-请求ed corrections Files to read references/default-config.json references/config-图形界面de.md references/过滤器-cata记录.md references/implementation-notes.md references/记录ging-and-review.md references/llm-review.md references/cron-example.md references/AIn-emAIl-review.模式.json 运行器s MAIn 运行器: scripts/gmAIl_labeler_运行器.py Launcher example: scripts/gmAIl_labeler_运行.sh Publishing 图形界面dance
Before publishing:
keep only generic defaults in the 技能 移除 personal accounts, chat ids, private domAIns, and custom user rules keep examples generic document clearly that private configuration belongs in the local overlay keep PR / press-release handling user-specific when it reflects private editorial policy; do not publish those local heuristics by default 验证 cron/non-interactive execution via the launcher, not only via direct Python invocation