python command).| Variable | Description | Default |
|---|---|---|
IMAP_HOST |
IMAP server hostname | imap.gmail.com |
IMAP_PORT |
IMAP server port | 993 |
IMAP_USERNAME |
IMAP login username | (required) |
IMAP_PASSWORD |
IMAP login password / app-password | (required) |
IMAP_MAX_BODY_CHARS |
Max body characters per email | 2000 |
Set 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",
"imapPort": 993,
"imapUsername": "your@gmail.com",
"imapPassword": "your-app-password",
"maxBodyChars": 2000
}
}
IMAP_HOST, IMAP_PORT, IMAP_USERNAME, IMAP_PASSWORD) so no file on disk is read at all.email fields listed above. The script reads only those four fields and nothing else from the file.IMAP_HOST / email.imapHost. No other endpoints are contacted.Run the fetch script via exec tool:
python {workspace}/skills/gmail-summarize/scripts/fetch_unseen.py
(replace {workspace} with your actual workspace root)
Parse the JSON array. Each item has: sender, subject, date, body
For each email compose one line:
[date] sender | subject — one-sentence body summary
Send the full digest via MessageTool in this format:
📬 邮件摘要 (N封,覆盖 MM/DD–MM/DD)
• [日期] 发件人 | 主题 — 一句话摘要 • [日期] 发件人 | 主题 — 一句话摘要 ...
If result is empty, send: 📭 近两日暂无未读邮件
小葱技能站7w4.net,专业的AI技能分享平台。
这是一款稳定可靠的 Gmail 邮件摘要工具。安全性和数据保护做得很好,配置简单直观,能快速获取近两日未读邮件并生成中文摘要。输出格式简洁清晰,适合日常使用。不足之处在于定制灵活性有限,连接异常时的容错处理可以更完善,但核心功能表现扎实,整体质量值得信赖。