M365 Mailbox (Graph)
/install m365-mailbox
M365 Mailbox (Microsoft Graph)
Installation / runtime requirements
- Requires Node.js (scripts are Node ESM).
- This skill declares its npm dependency in
package.json. - After installing/updating the skill, install deps:
cd skills/m365-mailbox
npm install
Security / boundaries
- Never commit or share token caches.
- Default secret location (per machine):
~/.openclaw/secrets/m365-mailbox/
Setup philosophy (permission-aware)
During setup, the user chooses:
- What Graph permissions to request (minimal vs broad)
- What OpenClaw is allowed to do autonomously vs what must ask for confirmation
Two modes:
- Minimal-consent mode (more secure): request only the scopes required for the chosen feature set.
- Broad-consent mode (more flexible): request a superset of scopes, but enforce an autonomy policy locally.
Quick start
0) First question: connect M365 Business or M365 Home/Consumer?
- Home/Consumer =
hotmail.com,outlook.com,live.com - Business = Work/School account (Exchange Online)
1) Privacy / keys
- No third-party API key required.
- Auth is done via your own Microsoft login (device code flow).
- Tokens are stored locally per profile on the OpenClaw machine.
2) One-command setup (interactive)
node skills/m365-mailbox/scripts/setup.mjs --profile home --tenant consumers --email [email protected] --clientId \x3CYOUR_APP_CLIENT_ID> --tz Europe/Vienna
node skills/m365-mailbox/scripts/setup.mjs --profile business --tenant organizations --email [email protected] --clientId \x3CIT_PROVIDED_CLIENT_ID> --tz Europe/Vienna
3) Use (examples)
node skills/m365-mailbox/scripts/list-unread.mjs --profile home --top 20
node skills/m365-mailbox/scripts/search.mjs --profile home --query "invoice" --top 20
node skills/m365-mailbox/scripts/get-message.mjs --profile home --id \x3CMSG_ID>
node skills/m365-mailbox/scripts/create-draft.mjs --profile home --to [email protected] --subject "Hi" --body "..."
node skills/m365-mailbox/scripts/send-draft.mjs --profile home --id \x3CDRAFT_ID>
Business note (users without IT admin rights)
Many tenants block:
- creating app registrations as a normal user
- user consent to new apps
Mail.SendorMail.ReadWritewithout admin consent
In that case this skill can still work for Business accounts, but only if your IT/SysAdmin provides a clientId for an app registration configured with:
- Delegated Microsoft Graph permissions (depending on your chosen feature set):
Mail.Read,Mail.ReadWrite,Mail.Send, (optional)offline_access - Public client flows enabled (Device Code)
- (Often required) Admin consent granted
If you don’t get such a clientId/consent from IT, you can still use the skill with a Consumer account.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install m365-mailbox - 安装完成后,直接呼叫该 Skill 的名称或使用
/m365-mailbox触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
M365 Mailbox (Graph) 是什么?
Automate Microsoft 365 mailbox tasks via Microsoft Graph: read, search, draft, send emails for Business and Consumer accounts with device code authentication. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 976 次。
如何安装 M365 Mailbox (Graph)?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install m365-mailbox」即可一键安装,无需额外配置。
M365 Mailbox (Graph) 是免费的吗?
是的,M365 Mailbox (Graph) 完全免费(开源免费),可自由下载、安装和使用。
M365 Mailbox (Graph) 支持哪些平台?
M365 Mailbox (Graph) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 M365 Mailbox (Graph)?
由 Thomas J. Radman(@tradmangh)开发并维护,当前版本 v0.1.1。