outlook
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOutlook Email & Calendar
Outlook 邮件与日历
Access Microsoft 365 Outlook email and calendar via Microsoft Graph API.
通过Microsoft Graph API访问Microsoft 365 Outlook邮件和日历。
Prerequisites
前置条件
- Credentials configured in (run setup if not done)
~/.outlook/ - Azure CLI, jq, curl installed
Note: Tokens are automatically refreshed when needed. No manual intervention required.
- 已在中配置凭据(未配置请运行设置脚本)
~/.outlook/ - 已安装Azure CLI、jq、curl
注意: 令牌会在需要时自动刷新,无需手动干预。
Email Operations
邮件操作
Reading Email
查看邮件
bash
undefinedbash
undefinedList inbox (default 10 messages)
List inbox (default 10 messages)
~/.claude/skills/outlook/scripts/outlook-mail.sh inbox
~/.claude/skills/outlook/scripts/outlook-mail.sh inbox
List more messages
List more messages
~/.claude/skills/outlook/scripts/outlook-mail.sh inbox 25
~/.claude/skills/outlook/scripts/outlook-mail.sh inbox 25
Unread only
Unread only
~/.claude/skills/outlook/scripts/outlook-mail.sh unread
~/.claude/skills/outlook/scripts/outlook-mail.sh unread
Focused inbox only
Focused inbox only
~/.claude/skills/outlook/scripts/outlook-mail.sh focused
~/.claude/skills/outlook/scripts/outlook-mail.sh focused
List sent items (your sent emails)
List sent items (your sent emails)
~/.claude/skills/outlook/scripts/outlook-mail.sh sent
~/.claude/skills/outlook/scripts/outlook-mail.sh sent 25
~/.claude/skills/outlook/scripts/outlook-mail.sh sent
~/.claude/skills/outlook/scripts/outlook-mail.sh sent 25
List messages from any folder by name (searches recursively)
List messages from any folder by name (searches recursively)
~/.claude/skills/outlook/scripts/outlook-mail.sh folder "Chawton Hector" 20
~/.claude/skills/outlook/scripts/outlook-mail.sh folder "Chawton Hector" 20
Filter by sender
Filter by sender
~/.claude/skills/outlook/scripts/outlook-mail.sh from "john@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh from "john@example.com"
Search emails
Search emails
~/.claude/skills/outlook/scripts/outlook-mail.sh search "project update"
~/.claude/skills/outlook/scripts/outlook-mail.sh search "project update"
Read full message (use ID from list)
Read full message (use ID from list)
~/.claude/skills/outlook/scripts/outlook-mail.sh read <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh read <message-id>
Quick preview (subject, from, date, body preview)
Quick preview (subject, from, date, body preview)
~/.claude/skills/outlook/scripts/outlook-mail.sh preview <message-id>
undefined~/.claude/skills/outlook/scripts/outlook-mail.sh preview <message-id>
undefinedSending Email
发送邮件
bash
undefinedbash
undefinedCreate plain text draft
Create plain text draft
~/.claude/skills/outlook/scripts/outlook-mail.sh draft "recipient@example.com" "Subject" "Body text"
~/.claude/skills/outlook/scripts/outlook-mail.sh draft "recipient@example.com" "Subject" "Body text"
Create markdown-formatted draft (converts to HTML)
Create markdown-formatted draft (converts to HTML)
~/.claude/skills/outlook/scripts/outlook-mail.sh mddraft "recipient@example.com" "Subject" "Bold and italic text"
~/.claude/skills/outlook/scripts/outlook-mail.sh mddraft "recipient@example.com" "Subject" "Bold and italic text"
Send a draft (use draft ID)
Send a draft (use draft ID)
~/.claude/skills/outlook/scripts/outlook-mail.sh send <draft-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh send <draft-id>
Reply to a message (plain text - creates draft)
Reply to a message (plain text - creates draft)
~/.claude/skills/outlook/scripts/outlook-mail.sh reply <message-id> "Reply body"
~/.claude/skills/outlook/scripts/outlook-mail.sh reply <message-id> "Reply body"
Reply with markdown formatting (converts to HTML - creates draft)
Reply with markdown formatting (converts to HTML - creates draft)
~/.claude/skills/outlook/scripts/outlook-mail.sh mdreply <message-id> "Bold reply with formatting"
~/.claude/skills/outlook/scripts/outlook-mail.sh mdreply <message-id> "Bold reply with formatting"
Send reply draft
Send reply draft
~/.claude/skills/outlook/scripts/outlook-mail.sh send <reply-draft-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh send <reply-draft-id>
Follow up on your own sent email (chaser)
Follow up on your own sent email (chaser)
~/.claude/skills/outlook/scripts/outlook-mail.sh followup <sent-message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh followup <sent-message-id> "Custom follow-up body in markdown"
~/.claude/skills/outlook/scripts/outlook-mail.sh followup <sent-message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh followup <sent-message-id> "Custom follow-up body in markdown"
Update an existing draft
Update an existing draft
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> subject "New subject line"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> body "Plain text body"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> mdbody "Markdown body"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> to "new-recipient@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> cc "cc@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> bcc "bcc@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> subject "New subject line"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> body "Plain text body"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> mdbody "Markdown body"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> to "new-recipient@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> cc "cc@example.com"
~/.claude/skills/outlook/scripts/outlook-mail.sh update <draft-id> bcc "bcc@example.com"
List drafts
List drafts
~/.claude/skills/outlook/scripts/outlook-mail.sh drafts
**Note:** `mddraft`, `mdreply`, and `update mdbody` require `pandoc` for markdown conversion. Install with `brew install pandoc` (macOS) or `apt install pandoc` (Linux).
**IMPORTANT:** Always prefer `mdreply` over `reply` for professional emails - plain text replies look poorly formatted in Outlook.~/.claude/skills/outlook/scripts/outlook-mail.sh drafts
**注意:** `mddraft`、`mdreply`和`update mdbody`命令需要`pandoc`进行markdown格式转换。可通过`brew install pandoc`(macOS)或`apt install pandoc`(Linux)安装。
**重要提示:** 发送专业邮件时请优先使用`mdreply`而非`reply`——纯文本回复在Outlook中显示格式较差。Attachments
附件操作
Reading attachments:
bash
undefined查看附件:
bash
undefinedList attachments on a message
List attachments on a message
~/.claude/skills/outlook/scripts/outlook-mail.sh attachments <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh attachments <message-id>
Download ALL attachments to ./inbox/
Download ALL attachments to ./inbox/
~/.claude/skills/outlook/scripts/outlook-mail.sh download <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh download <message-id>
Download specific attachment
Download specific attachment
~/.claude/skills/outlook/scripts/outlook-mail.sh download <message-id> <attachment-id>
**Adding attachments to drafts:**
```bash~/.claude/skills/outlook/scripts/outlook-mail.sh download <message-id> <attachment-id>
**为草稿添加附件:**
```bashAdd attachment to a draft (supports files up to 150MB)
Add attachment to a draft (supports files up to 150MB)
~/.claude/skills/outlook/scripts/outlook-mail.sh attach <draft-id> <file-path>
Upload method is automatic based on file size:
- **Small files (< 3MB):** Direct base64 upload - instant
- **Large files (3MB - 150MB):** Chunked upload with progress indicator
Multiple attachments can be added by calling `attach` multiple times on the same draft.~/.claude/skills/outlook/scripts/outlook-mail.sh attach <draft-id> <file-path>
上传方式会根据文件大小自动选择:
- **小文件(<3MB):** 直接base64上传——即时完成
- **大文件(3MB-150MB):** 分块上传并显示进度指示器
可多次调用`attach`命令为同一草稿添加多个附件。Email Management
邮件管理
bash
undefinedbash
undefinedMark as read
Mark as read
~/.claude/skills/outlook/scripts/outlook-mail.sh markread <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh markread <message-id>
Mark as unread
Mark as unread
~/.claude/skills/outlook/scripts/outlook-mail.sh markunread <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh markunread <message-id>
Delete
Delete
~/.claude/skills/outlook/scripts/outlook-mail.sh delete <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh delete <message-id>
Archive
Archive
~/.claude/skills/outlook/scripts/outlook-mail.sh archive <message-id>
~/.claude/skills/outlook/scripts/outlook-mail.sh archive <message-id>
Move to any folder (searches by name, supports nested folders)
Move to any folder (searches by name, supports nested folders)
~/.claude/skills/outlook/scripts/outlook-mail.sh move <message-id> "Projects"
~/.claude/skills/outlook/scripts/outlook-mail.sh move <message-id> "Clients/Acme"
undefined~/.claude/skills/outlook/scripts/outlook-mail.sh move <message-id> "Projects"
~/.claude/skills/outlook/scripts/outlook-mail.sh move <message-id> "Clients/Acme"
undefinedFolder Management
文件夹管理
bash
undefinedbash
undefinedList top-level folders
List top-level folders
~/.claude/skills/outlook/scripts/outlook-mail.sh folders
~/.claude/skills/outlook/scripts/outlook-mail.sh folders
List subfolders of a folder (default: inbox)
List subfolders of a folder (default: inbox)
~/.claude/skills/outlook/scripts/outlook-mail.sh subfolders
~/.claude/skills/outlook/scripts/outlook-mail.sh subfolders "Important"
~/.claude/skills/outlook/scripts/outlook-mail.sh subfolders
~/.claude/skills/outlook/scripts/outlook-mail.sh subfolders "Important"
Create a new top-level folder
Create a new top-level folder
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Projects"
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Projects"
Create a subfolder under an existing folder
Create a subfolder under an existing folder
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Acme" "Clients"
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Urgent" inbox
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Acme" "Clients"
~/.claude/skills/outlook/scripts/outlook-mail.sh mkdir "Urgent" inbox
Inbox statistics (total, unread counts)
Inbox statistics (total, unread counts)
~/.claude/skills/outlook/scripts/outlook-mail.sh stats
undefined~/.claude/skills/outlook/scripts/outlook-mail.sh stats
undefinedCalendar Operations
日历操作
Viewing Calendar
查看日历
bash
undefinedbash
undefinedUpcoming events (default 10)
Upcoming events (default 10)
~/.claude/skills/outlook/scripts/outlook-calendar.sh events
~/.claude/skills/outlook/scripts/outlook-calendar.sh events
Today's events
Today's events
~/.claude/skills/outlook/scripts/outlook-calendar.sh today
~/.claude/skills/outlook/scripts/outlook-calendar.sh today
This week
This week
~/.claude/skills/outlook/scripts/outlook-calendar.sh week
~/.claude/skills/outlook/scripts/outlook-calendar.sh week
Read event details
Read event details
~/.claude/skills/outlook/scripts/outlook-calendar.sh read <event-id>
~/.claude/skills/outlook/scripts/outlook-calendar.sh read <event-id>
List calendars
List calendars
~/.claude/skills/outlook/scripts/outlook-calendar.sh calendars
undefined~/.claude/skills/outlook/scripts/outlook-calendar.sh calendars
undefinedCreating Events
创建事件
bash
undefinedbash
undefinedCreate event (dates in YYYY-MM-DDTHH:MM format)
Create event (dates in YYYY-MM-DDTHH:MM format)
~/.claude/skills/outlook/scripts/outlook-calendar.sh create "Meeting subject" "2025-02-05T14:00" "2025-02-05T15:00" "Conference Room A"
~/.claude/skills/outlook/scripts/outlook-calendar.sh create "Meeting subject" "2025-02-05T14:00" "2025-02-05T15:00" "Conference Room A"
Quick 1-hour event
Quick 1-hour event
~/.claude/skills/outlook/scripts/outlook-calendar.sh quick "Team standup" "2025-02-05T09:00"
undefined~/.claude/skills/outlook/scripts/outlook-calendar.sh quick "Team standup" "2025-02-05T09:00"
undefinedAvailability
可用性查询
bash
undefinedbash
undefinedCheck free/busy
Check free/busy
~/.claude/skills/outlook/scripts/outlook-calendar.sh free "2025-02-05T09:00" "2025-02-05T17:00"
undefined~/.claude/skills/outlook/scripts/outlook-calendar.sh free "2025-02-05T09:00" "2025-02-05T17:00"
undefinedWorkflow: Capturing Email to Brain
工作流:将邮件存入知识库
When user wants to capture an email:
- List emails to find the one to capture
- Read the full message content
- Check for attachments with command
attachments - Download any attachments (goes to )
./inbox/ - Create markdown file in brain's directory:
inbox/
markdown
undefined当用户需要保存邮件时:
- 列出邮件找到目标邮件
- 读取完整邮件内容
- 使用命令查看附件
attachments - 下载所有附件(保存至)
./inbox/ - 在知识库的目录创建markdown文件:
inbox/
markdown
undefinedEmail: [Subject]
Email: [Subject]
From: sender@example.com
Date: YYYY-MM-DD HH:MM
Captured: YYYY-MM-DD
From: sender@example.com
Date: YYYY-MM-DD HH:MM
Captured: YYYY-MM-DD
Content
Content
[Email body]
[Email body]
Attachments
Attachments
- [[inbox/filename.pdf]] (captured)
- [[inbox/filename.pdf]] (captured)
Notes
Notes
[User's annotations]
undefined[User's annotations]
undefinedWorkflow: Processing Email Attachments
工作流:处理邮件附件
When user wants to grab attachments from an email:
- Find the email: ,
inbox, orsearchcommandsfrom - List attachments:
attachments <message-id> - Download: (all) or
download <message-id>(specific)download <message-id> <attachment-id> - Files land in for processing
./inbox/ - User allocates files to appropriate areas during review
当用户需要提取邮件附件时:
- 通过、
inbox或search命令找到目标邮件from - 使用列出附件
attachments <message-id> - 使用(全部)或
download <message-id>(指定)下载附件download <message-id> <attachment-id> - 文件将保存至等待处理
./inbox/ - 用户在审阅时将文件分配至对应区域
Workflow: Sending Email
工作流:发送邮件
Always draft first, confirm, then send:
- Create draft with or
draftcommandmddraft - Show user the draft content
- Wait for "send it" or change requests
- Update draft if needed
- Send with command only after explicit approval
send
请始终先创建草稿、确认内容后再发送:
- 使用或
draft命令创建草稿mddraft - 向用户展示草稿内容
- 等待用户“发送”指令或修改请求
- 如有需要更新草稿
- 仅在获得明确批准后使用命令发送
send
Workflow: Sending Email with Attachments
工作流:发送带附件的邮件
- Create draft with or
draftcommandmddraft - Add attachments with (repeat for multiple files)
attach <draft-id> <file-path> - Show user the draft details and attached files
- Wait for confirmation
- Send with command only after explicit approval
send
Example:
bash
undefined- 使用或
draft命令创建草稿mddraft - 使用添加附件(可多次调用添加多个文件)
attach <draft-id> <file-path> - 向用户展示草稿详情及附件列表
- 等待用户确认
- 仅在获得明确批准后使用命令发送
send
示例:
bash
undefinedCreate draft
Create draft
~/.claude/skills/outlook/scripts/outlook-mail.sh draft "bob@example.com" "Q4 Report" "Please find the report attached."
~/.claude/skills/outlook/scripts/outlook-mail.sh draft "bob@example.com" "Q4 Report" "Please find the report attached."
Output: Draft ID: xxxxxxxxxxxxxxxxxxxx
Output: Draft ID: xxxxxxxxxxxxxxxxxxxx
Attach files (can be called multiple times)
Attach files (can be called multiple times)
~/.claude/skills/outlook/scripts/outlook-mail.sh attach xxxxxxxxxxxxxxxxxxxx /path/to/report.pdf
~/.claude/skills/outlook/scripts/outlook-mail.sh attach xxxxxxxxxxxxxxxxxxxx /path/to/data.xlsx
~/.claude/skills/outlook/scripts/outlook-mail.sh attach xxxxxxxxxxxxxxxxxxxx /path/to/report.pdf
~/.claude/skills/outlook/scripts/outlook-mail.sh attach xxxxxxxxxxxxxxxxxxxx /path/to/data.xlsx
Send after user confirms
Send after user confirms
~/.claude/skills/outlook/scripts/outlook-mail.sh send xxxxxxxxxxxxxxxxxxxx
undefined~/.claude/skills/outlook/scripts/outlook-mail.sh send xxxxxxxxxxxxxxxxxxxx
undefinedWorkflow: Sending Follow-up / Chaser Emails
工作流:发送跟进邮件
When user wants to follow up on an email they sent:
- List sent items with command to find the original email
sent - Create follow-up with (uses default message) or provide custom body
followup <sent-id> - Show user the draft content
- Wait for confirmation or changes
- Send with command only after explicit approval
send
Example:
bash
undefined当用户需要跟进已发送的邮件时:
- 使用命令列出已发送邮件找到原邮件
sent - 使用创建跟进草稿(使用默认内容)或提供自定义正文
followup <sent-id> - 向用户展示草稿内容
- 等待用户确认或修改
- 仅在获得明确批准后使用命令发送
send
示例:
bash
undefinedFind the original sent email
Find the original sent email
~/.claude/skills/outlook/scripts/outlook-mail.sh sent 20
~/.claude/skills/outlook/scripts/outlook-mail.sh sent 20
Create follow-up draft (default body)
Create follow-up draft (default body)
~/.claude/skills/outlook/scripts/outlook-mail.sh followup abc123xyz
~/.claude/skills/outlook/scripts/outlook-mail.sh followup abc123xyz
Or with custom message
Or with custom message
~/.claude/skills/outlook/scripts/outlook-mail.sh followup abc123xyz "Hi, just checking in on this. Would be great to get your thoughts when you have a moment."
~/.claude/skills/outlook/scripts/outlook-mail.sh followup abc123xyz "Hi, just checking in on this. Would be great to get your thoughts when you have a moment."
Send after user confirms
Send after user confirms
~/.claude/skills/outlook/scripts/outlook-mail.sh send <draft-id>
undefined~/.claude/skills/outlook/scripts/outlook-mail.sh send <draft-id>
undefinedWorkflow: Creating Calendar Events
工作流:创建日历事件
Always confirm before creating:
- Parse user's request for: subject, start time, end time, location
- Show proposed event details to user
- Wait for confirmation or adjustments
- Create event only after explicit "yes" / approval
请始终在创建前确认:
- 解析用户请求中的主题、开始时间、结束时间、地点
- 向用户展示拟创建的事件详情
- 等待用户确认或调整
- 仅在获得明确“同意”后创建事件
Error Handling
错误处理
- Token expired: Automatically refreshed on next call
- Permission denied: Re-run setup to re-consent
- Network error: Check connectivity, retry
- 令牌过期: 下次调用时自动刷新
- 权限拒绝: 重新运行设置脚本以重新授权
- 网络错误: 检查网络连接后重试
Setup
设置
If not configured, run:
bash
~/.claude/skills/outlook/scripts/outlook-setup.shSee for manual setup instructions.
references/setup.md若未配置,请运行:
bash
~/.claude/skills/outlook/scripts/outlook-setup.sh如需手动设置,请查看中的说明。
references/setup.md