$cd ../use-cases/
⚡ 生产力最受欢迎20 分钟配置
$ cat email-ai-assistant.md

await manageInbox(gmail, { autoTriage: true })

/** 我让 OpenClaw 管理我的收件箱 30 天,结果就是这样。 */

📊 30 天实验结果
94%
邮件正确分类
2.1 小时
每周节省时间
0
重要邮件遗漏
$0
使用本地 Ollama 运行
how_it_works.md

⚙️ 工作原理

1.
OpenClaw 每 5 分钟轮询 Gmail
使用只读权限的 Gmail API,凭证永不离开你的服务器。
2.
LLM 对每封邮件进行分类
类别:紧急 / 需回复 / 订阅邮件 / 归档
3.
你收到 Telegram 摘要
早晚各一条关键信息摘要,紧急邮件立即推送提醒。
4.
在聊天中回复,OpenClaw 发送草稿
在 Telegram 消息中提供背景信息,OpenClaw 起草回复供你审核。
setup.yaml

📦 配置步骤(20 分钟)

// 步骤 1:在 Google Cloud Console 启用 Gmail API → 下载 credentials.json
$ cp ~/Downloads/credentials.json ~/.openclaw/gmail/
// 步骤 2:在配置文件中添加 Gmail 技能
skills:
gmail:
enabled: true
poll_interval: 300
notify_channel: "telegram"
// 步骤 3:授权并测试
$ openclaw skill gmail auth
$ openclaw skill gmail test
# ✓ Connected. 47 unread emails found.
example_digest.log

📬 早间摘要示例

🦞 OpenClaw — Morning Email Digest (08:00)
🔴 Urgent (2)
• Invoice #1042 overdue — from Acme Corp
• Server alert from DigitalOcean — disk at 94%
💬 Needs Reply (4)
• Interview request from Recruiter at Stripe
• Meeting reschedule — John (tomorrow 2pm → 4pm?)
📰 Newsletters archived: 12 | Automated: 8

❓ FAQ

Q1. OpenClaw 会读取我所有邮件吗?

只用只读 Gmail API。分类和摘要邮件,但不会未经审批修改、删除或转发。

Q2. 能帮我写回复吗?

能。在 Telegram 摘要中回复上下文,OpenClaw 起草回复。审核通过后通过 Gmail API 发送。

Q3. 邮件分类准确率如何?

30 天测试 94%。LLM 理解上下文,知道 DigitalOcean 服务器警报是紧急的,Medium 周刊要归档。

Q4. 数据安全吗?

全部本地处理。用本地 LLM 则邮件内容不离开机器。