Email Summary Skill
This skill fetches recent emails from your Gmail account and provides AI-powered summaries.
How it works
When invoked, this skill will:
- 1. Authenticate with Gmail API using credentials at INLINECODE0
- Fetch recent emails (default: last 10 unread emails)
- Summarize each email with:
- Sender and subject
- Key points from the email body
- Recommended actions or responses
- 4. Present results in an organized, easy-to-scan format
Instructions for the Agent
When this skill is invoked:
- 1. First, verify that the Gmail API credentials exist at the path specified in
$GMAIL_CREDENTIALS_PATH environment variable - Run the helper script located at
{baseDir}/scripts/fetch_emails.py with the appropriate arguments:
- Default:
python3 {baseDir}/scripts/fetch_emails.py --count 10
- With arguments:
python3 {baseDir}/scripts/fetch_emails.py $ARGUMENTS
- 3. Parse the JSON output from the script
- For each email, provide a concise summary including:
-
From: Sender name and email
-
Subject: Email subject line
-
Summary: 2-3 sentence summary of key points
-
Action: Suggested action (reply, archive, flag for follow-up, etc.)
- 5. Present all summaries in a well-formatted list
Usage Examples
CODEBLOCK0
Fetches and summarizes the last 10 unread emails.
CODEBLOCK1
Fetches and summarizes the last 20 unread emails.
CODEBLOCK2
Fetches and summarizes all unread emails.
Setup Requirements
Before using this skill, ensure:
- - Gmail API credentials are configured
- Environment variable
GMAIL_CREDENTIALS_PATH points to your credentials JSON file - Python 3 and required packages are installed (see setup guide in README.md)
技能名称:email-summary
详细描述:
邮件摘要技能
该技能可从您的Gmail账户中获取最近的邮件,并提供AI驱动的摘要。
工作原理
调用此技能时,将执行以下操作:
- 1. 使用Gmail API进行身份验证,凭据位于$GMAILCREDENTIALSPATH
- 获取最近的邮件(默认:最近10封未读邮件)
- 为每封邮件生成摘要,包括:
- 发件人和主题
- 邮件正文的关键要点
- 建议的操作或回复
- 4. 以组织有序、易于浏览的格式呈现结果
代理指令
当调用此技能时:
- 1. 首先,验证Gmail API凭据是否存在于$GMAILCREDENTIALSPATH环境变量指定的路径中
- 使用适当参数运行位于{baseDir}/scripts/fetch_emails.py的辅助脚本:
- 默认:python3 {baseDir}/scripts/fetch_emails.py --count 10
- 带参数:python3 {baseDir}/scripts/fetch_emails.py $ARGUMENTS
- 3. 解析脚本输出的JSON数据
- 为每封邮件提供简洁摘要,包括:
-
发件人:发件人姓名和邮箱
-
主题:邮件主题行
-
摘要:2-3句关键要点总结
-
操作:建议操作(回复、归档、标记待跟进等)
- 5. 以格式良好的列表呈现所有摘要
使用示例
/email-summary
获取并总结最近10封未读邮件。
/email-summary --count 20
获取并总结最近20封未读邮件。
/email-summary --all
获取并总结所有未读邮件。
设置要求
使用此技能前,请确保:
- - 已配置Gmail API凭据
- 环境变量GMAILCREDENTIALSPATH指向您的凭据JSON文件
- 已安装Python 3及所需包(详见README.md中的设置指南)