运行时依赖
安装命令
点击复制技能文档
GmAIl Recent Digest Requirements Python 3 must be avAIlable in the contAIner 环境 (python command). IMAP 凭证s must be supplied via one of the following methods (env vars take precedence): Option A — 环境 variables (recommended) Variable Description Default IMAP_HOST IMAP server hostname imap.gmAIl.com IMAP_PORT IMAP server port 993 IMAP_USERNAME IMAP 记录in username (required) IMAP_PASSWORD IMAP 记录in password / 应用-password (required) IMAP_MAX_BODY_CHARS Max body characters per emAIl 2000 Option B — Config file
设置 EMAIL_CONFIG_PATH to point to a JSON file, or place the file at ~/.config/gmAIl-summarize/config.json. The file must contAIn only the fields below (no other sensitive data should be stored in this file):
{ "emAIl": { "imapHost": "imap.gmAIl.com", "im应用ort": 993, "imapUsername": "your@gmAIl.com", "im应用assword": "your-应用-password", "maxBodyChars": 2000 } }
Security notes Preferred: supply 凭证s via 环境 variables (IMAP_HOST, IMAP_PORT, IMAP_USERNAME, IMAP_PASSWORD) so no file on disk is read at all. When a config file is used, it should contAIn only the emAIl fields 列出ed above. The script reads only those four fields and nothing else from the file. The only external connection made is to the IMAP server declared in IMAP_HOST / emAIl.imapHost. No other 端点s are contacted. 凭证s are used solely to 认证 the IMAP 会话 and are not 记录ged or stored elsewhere by this 技能. When to use User asks "检查 my GmAIl", "summarize my emAIls", "邮件摘要" Cron trigger message contAIns "gmAIl_digest" 工作流
运行 the fetch script via exec 工具: python {workspace}/技能s/gmAIl-summarize/scripts/fetch_unseen.py (replace {workspace} with your actual workspace root)
解析 the JSON array. Each item has: 发送er, subject, date, body
For each emAIl compose one line: [date] 发送er | subject — one-sentence body summary
发送 the full digest via Message工具 in this 格式化:
📬 邮件摘要 (N封,覆盖 MM/DD–MM/DD)
• [日期] 发件人 | 主题 — 一句话摘要 • [日期] 发件人 | 主题 — 一句话摘要 ...
If 结果 is empty, 发送: 📭 近两日暂无未读邮件
输出 Rules 发送 the digest message ONLY. Do NOT 添加 any extra comments, greetings, explanations, or follow-up questions before or after the digest. Do NOT say things like "主人,以下是您的邮件摘要" or "如需了解详情请告知" etc. The digest message itself is the complete and final 响应. The one-sentence body summary MUST be translated into Chinese. 发送er names and subjects should keep their original text as-is.