Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Your AI assistant authenticates as itself but accesses the owner's mailbox/calendar as a delegate. Modified for delegate access from https://clawhub.ai/jotamed/outlook
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install outlook-skill-clawhub或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install outlook-skill-clawhub⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/outlook-skill-clawhub/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: outlook-delegate description: Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Your AI assistant authenticates as itself but accesses the owner's mailbox/calendar as a delegate. Modified for delegate access from https://clawhub.ai/jotamed/outlook version: 1.0.0 author: 87marc ---
Access another user's Outlook/Microsoft 365 email and calendar as a delegate via Microsoft Graph API.
This skill is designed for scenarios where:
[email protected])| Feature | Direct Access (/me) | Delegate Access (/users/{id}) | |---------|----------------------|--------------------------------| | API Base | /me/messages | /users/{owner}/messages | | Send Email | Appears "From: Owner" | Appears "From: Assistant on behalf of Owner" | | Calendar | Full control | Based on permission level granted | | Permissions | Mail.ReadWrite, Mail.Send | Mail.ReadWrite.Shared, Mail.Send.Shared, Calendars.ReadWrite.Shared |
~/.outlook-mcp/config.json{
"client_id": "your-app-client-id",
"client_secret": "your-app-client-secret",
"owner_email": "[email protected]",
"delegate_email": "[email protected]"
}
The owner_email is the mailbox the assistant will access as a delegate.
The app registration needs delegated permissions (not application permissions):
Mail.ReadWrite.Shared - Read/write access to shared mailboxesMail.Send.Shared - Send mail on behalf of othersCalendars.ReadWrite.Shared - Read/write shared calendarsUser.Read - Read assistant's own profileoffline_access - Refresh tokensThe owner must grant the assistant delegate access via Exchange/Outlook:
PowerShell (Admin):
# Grant mailbox access
Add-MailboxPermission -Identity "[email protected]" -User "[email protected]" -AccessRights FullAccess
# Grant Send-on-Behalf
Set-Mailbox -Identity "[email protected]" -GrantSendOnBehalfTo "[email protected]"
# Grant calendar access (Editor = can create/modify events)
Add-MailboxFolderPermission -Identity "[email protected]:\Calendar" -User "[email protected]" -AccessRights Editor -SharingPermissionFlags Delegate
Or via Outlook Settings: The owner can add the assistant as a delegate in Outlook → File → Account Settings → Delegate Access.
The assistant authenticates as itself via OAuth2, then accesses the owner's resources using the /users/{[email protected]}/ endpoint.
./scripts/outlook-token.sh refresh # Refresh expired token
./scripts/outlook-token.sh test # Test connection to BOTH accounts
./scripts/outlook-token.sh get # Print access token
./scripts/outlook-mail.sh inbox [count] # Owner's inbox
./scripts/outlook-mail.sh unread [count] # Owner's unread
./scripts/outlook-mail.sh search "query" [count] # Search owner's mail
./scripts/outlook-mail.sh from <email> [count] # Owner's mail from sender
./scripts/outlook-mail.sh read <id> # Read email content
./scripts/outlook-mail.sh mark-read <id> # Mark as read
./scripts/outlook-mail.sh mark-unread <id> # Mark as unread
./scripts/outlook-mail.sh flag <id> # Flag as important
./scripts/outlook-mail.sh delete <id> # Move to trash
./scripts/outlook-mail.sh archive <id> # Move to archive
./scripts/outlook-mail.sh move <id> <folder> # Move to folder
./scripts/outlook-mail.sh send <to> <subj> <body> # Send on behalf of owner
./scripts/outlook-mail.sh reply <id> "body" # Reply on behalf of owner
Note: Emails will show "Assistant on behalf of Owner" in the From field.
./scripts/outlook-calendar.sh events [count] # Owner's upcoming events
./scripts/outlook-calendar.sh today # Owner's today
./scripts/outlook-calendar.sh week # Owner's week
./scripts/outlook-calendar.sh read <id> # Event details
./scripts/outlook-calendar.sh free <start> <end> # Owner's availability
./scripts/outlook-calendar.sh create <subj> <start> <end> [location]
./scripts/outlook-calendar.sh quick <subject> [time]
The key change is replacing /me with /users/{owner_email}:
# Direct access (old)
API="https://graph.microsoft.com/v1.0/me"
# Delegate access (new)
OWNER=$(jq -r '.owner_email' "$CONFIG_FILE")
API="https://graph.microsoft.com/v1.0/users/$OWNER"
When sending mail as a delegate, you must specify the from address:
{
"message": {
"subject": "Meeting follow-up",
"from": {
"emailAddress": {
"address": "[email protected]"
}
},
"toRecipients": [{"emailAddress": {"address": "[email protected]"}}],
"body": {"contentType": "Text", "content": "..."}
}
}
The recipient sees: "Assistant on behalf of Owner
| Action | Required Permission | Exchange Setting | |--------|-------------------|-----------------| | Read owner's mail | Mail.ReadWrite.Shared | FullAccess or Reviewer | | Modify owner's mail | Mail.ReadWrite.Shared | FullAccess or Editor | | Send as owner | Mail.Send.Shared | SendOnBehalf | | Read owner's calendar | Calendars.ReadWrite.Shared | Reviewer+ | | Create events on owner's calendar | Calendars.ReadWrite.Shared | Editor |
"Access denied" or "403 Forbidden" → Check that the assistant has MailboxPermission on the owner's mailbox
"The mailbox is not found" → Verify owner_email in config.json is correct
"Insufficient privileges" → App registration missing .Shared permissions (check Azure AD)
Emails send but don't show "on behalf of" → Missing SendOnBehalf permission. Run:
Set-Mailbox -Identity "[email protected]" -GrantSendOnBehalfTo "[email protected]"
"Token expired" → Run outlook-token.sh refresh
~/.outlook-mcp/ - protect this directory~/.outlook-mcp/config.json - Client ID, secret, and owner/delegate emails~/.outlook-mcp/credentials.json - OAuth tokens (access + refresh)/users/{owner} instead of /meowner_email and delegate_email config fieldsfrom field.Shared variants安装 Outlook Delegate 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/outlook-skill-clawhub/ 目录(个人级,所有项目可用),或 .claude/skills/outlook-skill-clawhub/(项目级)。重启 AI 客户端后,用 /outlook-skill-clawhub 主动调用,或让 AI 根据上下文自动发现并使用。
Outlook Delegate 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Outlook Delegate 可免费安装使用。请查阅仓库了解许可证信息。
Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Your AI assistant authenticates as itself but accesses the owner's mailbox/calendar as a delegate. Modified for delegate access from https://clawhub.ai/jotamed/outlook
Outlook Delegate 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。