Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Supports sending as self, as owner (Send As), and on behalf of owner (Send on Behalf). Modified for delegate access from https://clawhub.ai/jotamed/outlook
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install outlook-delegate或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install outlook-delegate⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/outlook-delegate/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: outlook-delegate description: Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Supports sending as self, as owner (Send As), and on behalf of owner (Send on Behalf). Modified for delegate access from https://clawhub.ai/jotamed/outlook version: 1.1.0 author: 87marc ---
Access another user's Outlook/Microsoft 365 email and calendar as a delegate via Microsoft Graph API. Supports three sending modes: as yourself, as the owner, or on behalf of the owner.
This skill is designed for scenarios where:
All three modes use the same Graph API call (/users/{delegate}/sendMail with the from field set). The difference between Send As and Send on Behalf is determined entirely by which Exchange permission is granted, not by the API endpoint.
| Mode | Command | Exchange Permission Required | from field | sender field | What Recipient Sees | |------|---------|------------------------------|--------------|----------------|---------------------| | As Self | send | (none extra) | Delegate | Delegate | "From: Assistant" | | As Owner (Send As) | send-as | SendAs only | Owner | Owner | "From: Owner" | | On Behalf Of | send-behalf | SendOnBehalf only | Owner | Delegate | "From: Assistant on behalf of Owner" |
> ⚠️ CRITICAL: Do NOT grant both SendAs and SendOnBehalf permissions. If both are granted, Exchange always uses SendAs, and the "on behalf of" indication will never appear. Choose ONE based on your desired behavior.
When you call send-as or send-behalf, the skill makes the same API call: it sends via the delegate's endpoint with the owner in the from field. Microsoft Graph automatically sets the sender property to the authenticated user (the delegate). Whether the recipient sees "on behalf of" depends solely on the Exchange permission:
sender and from to the owner. No indication of delegation.sender as the delegate and from as the owner. Recipient sees "on behalf of."~/.outlook-mcp/config.json{
"client_id": "your-app-client-id",
"client_secret": "your-app-client-secret",
"tenant_id": "your-tenant-id",
"owner_email": "[email protected]",
"owner_name": "Owner Display Name",
"delegate_email": "[email protected]",
"delegate_name": "AI Assistant",
"timezone": "America/New_York"
}
| Field | Description | |-------|-------------| | client_id | Microsoft Entra ID App Registration client ID | | client_secret | Microsoft Entra ID App Registration client secret | | tenant_id | Your Microsoft Entra tenant ID (auto-detected during setup) | | owner_email | The mailbox the assistant accesses as delegate | | owner_name | Display name for the owner (used in From field) | | delegate_email | The assistant's own email address | | delegate_name | Display name for the assistant | | timezone | IANA timezone for calendar operations (e.g., America/New_York, Europe/London, UTC) |
Create an app registration in Azure Portal:
- Name: "AI Assistant Mail Access" - Supported account types: "Accounts in this organizational directory only" (single tenant) - Redirect URI: http://localhost:8400/callback
In your app → API permissions → Add a permission → Microsoft Graph → Delegated permissions:
Required for all modes:
Mail.ReadWrite — Read/write assistant's own mailMail.Send — Send mail as assistantCalendars.ReadWrite — Read/write calendarsUser.Read — Read own profileoffline_access — Refresh tokensRequired for delegate access:
Mail.ReadWrite.Shared — Read/write shared mailboxesMail.Send.Shared — Send on behalf of othersCalendars.ReadWrite.Shared — Read/write shared calendarsClick "Grant admin consent" (requires admin).
The owner (or an admin) must grant the assistant access via PowerShell.
Choose your sending mode FIRST, then grant the appropriate permissions:
# Connect to Exchange Online
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName [email protected]
# REQUIRED: Full Mailbox Access (for reading owner's mail)
Add-MailboxPermission -Identity "[email protected]" `
-User "[email protected]" `
-AccessRights FullAccess `
-InheritanceType All `
-AutoMapping $false
# REQUIRED: Calendar Delegate Access
Add-MailboxFolderPermission -Identity "[email protected]:\Calendar" `
-User "[email protected]" `
-AccessRights Editor `
-SharingPermissionFlags Delegate
Then choose ONE of the following — do NOT grant both:
# OPTION A: Send As (emails appear directly from owner, no indication)
Add-RecipientPermission -Identity "[email protected]" `
-Trustee "[email protected]" `
-AccessRights SendAs `
-Confirm:$false
# OPTION B: Send on Behalf (emails show "assistant on behalf of owner")
Set-Mailbox -Identity "[email protected]" `
-GrantSendOnBehalfTo "[email protected]"
Verify permissions:
# Check mailbox permissions
Get-MailboxPermission -Identity "[email protected]" | Where-Object {$_.User -like "*assistant*"}
# Check Send As
Get-RecipientPermission -Identity "[email protected]" | Where-Object {$_.Trustee -like "*assistant*"}
# Check Send on Behalf
Get-Mailbox "[email protected]" | Select-Object GrantSendOnBehalfTo
# Check Calendar permissions
Get-MailboxFolderPermission -Identity "[email protected]:\Calendar"
| Action | Graph Permission | Exchange Permission | |--------|-----------------|---------------------| | Read owner's mail | Mail.ReadWrite.Shared | FullAccess | | Send as self | Mail.Send | (none needed) | | Send as owner | Mail.Send.Shared | SendAs only | | Send on behalf of owner | Mail.Send.Shared | SendOnBehalf only | | Read/write owner's calendar | Calendars.ReadWrite.Shared | Editor |
./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-token.sh info # Show configuration info
./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 attachments <id> # List attachments
...
安装 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-delegate/ 目录(个人级,所有项目可用),或 .claude/skills/outlook-delegate/(项目级)。重启 AI 客户端后,用 /outlook-delegate 主动调用,或让 AI 根据上下文自动发现并使用。
Outlook Delegate 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Outlook Delegate 可免费安装使用。请查阅仓库了解许可证信息。
Read, search, and manage Outlook emails and calendar via Microsoft Graph API with delegate support. Supports sending as self, as owner (Send As), and on behalf of owner (Send on Behalf). Modified for delegate access from https://clawhub.ai/jotamed/outlook
Outlook Delegate 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。