← 返回
未分类 Key 中文

Inbox Manager

Authorize, read, triage, archive, trash, and summarize Gmail inboxes across multiple accounts. Uses Gmail API with OAuth.
授权、读取、分类、归档、删除并汇总多个账户的 Gmail 收件箱。使用 Gmail API 和 OAuth。
hohobohan
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 107
下载
💾 0
安装
1
版本
#latest

概述

Inbox Manager

Manage multiple Gmail accounts through a single Google Cloud project. One OAuth client, separate token per account.

Architecture

secrets/inbox/
  client_secret.json            — OAuth 2.0 Desktop client credentials (shared)
  accounts.json                  — {"account@gmail.com": {"label": ..., "token_file": "token-..."}}
  token-account-at-gmail-dot-com.json  — per-account OAuth token

scripts/inbox/
  inbox-auth-final.py           — one-shot OAuth: opens browser, saves token
  inbox-check.py                — read/filter/triage/delete via Gmail API

Adding a new account

  1. Run python3 scripts/inbox-auth-final.py on machine with browser access
  2. Log in to Gmail in the Chromium popup, authorize
  3. Token auto-saves to secrets/inbox/token-.json
  4. accounts.json auto-updated

Sanitization: @-at-, .-dot-

Gmail API scopes used

  • gmail.readonly — read messages
  • gmail.modify — trash, archive, mark read, label

Not used: gmail.send / gmail.compose (no auto-sending unless explicitly added)

Operations

List inbox

GET /gmail/v1/users/me/messages?labelIds=INBOX&maxResults=N
GET /gmail/v1/users/me/messages/{id}?format=metadata&metadataHeaders=From,Subject,Date

Search/filter

Use Gmail query syntax via q parameter:

  • from:traveloka — all from sender
  • is:unread — unread only
  • -from:accounts.google.com — exclude security alerts
  • after:2026/05/01 — date filter

Delete/trash

POST /gmail/v1/users/me/messages/{id}/trash

Batch via new_batch_http_request() for bulk operations (100 per batch).

Cleanup rules (spamforhobo examples)

SenderActionReason
------------------------
TravelokaTrashPromo emails
FlokkTrashPromo emails
FossilEraTrashPromo emails
TIDAL monthly reportsTrashOld newsletters
BloomThisTrashFeedback/promo
HelplingKeepActual reminders
SplitwiseKeepBalance updates
SRXKeepProperty updates
NLBKeepAccount notifications

Security notes

  • Tokens contain refresh tokens — treat as sensitive (NEVER commit)
  • Google may flag new accounts accessed via CLI-only; use established accounts
  • OAuth tokens auto-refresh; no manual reauth needed unless revoked
  • 3 security alerts on first auth are normal (Google notifying account owner)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-04 14:15

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

News Curator

hohobohan
抓取、过滤、去重后通过Telegram推送精选新闻简报,金融来源Benzinga,科技来源AI新闻RSS。
★ 0 📥 139

Dashboard Generator

hohobohan
生成自包含的 HTML 仪表板,用于内存日志、费用图表和 token 使用情况,按 cron 每小时运行。
★ 0 📥 135

Sync Adapter

hohobohan
本地 .md 文件同步至 Google 表格,使用去重哈希,适用于支出、投资及任意键值数据。
★ 0 📥 137