Install
openclaw skills install m365-mailboxAutomate Microsoft 365 mailbox tasks via Microsoft Graph: read, search, draft, send emails for Business and Consumer accounts with device code authentication.
openclaw skills install m365-mailboxpackage.json.cd skills/m365-mailbox
npm install
~/.openclaw/secrets/m365-mailbox/During setup, the user chooses:
Two modes:
hotmail.com, outlook.com, live.comnode skills/m365-mailbox/scripts/setup.mjs --profile home --tenant consumers --email you@outlook.com --clientId <YOUR_APP_CLIENT_ID> --tz Europe/Vienna
node skills/m365-mailbox/scripts/setup.mjs --profile business --tenant organizations --email you@company.com --clientId <IT_PROVIDED_CLIENT_ID> --tz Europe/Vienna
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 <MSG_ID>
node skills/m365-mailbox/scripts/create-draft.mjs --profile home --to you@example.com --subject "Hi" --body "..."
node skills/m365-mailbox/scripts/send-draft.mjs --profile home --id <DRAFT_ID>
Many tenants block:
Mail.Send or Mail.ReadWrite without admin consentIn 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:
Mail.Read, Mail.ReadWrite, Mail.Send, (optional) offline_accessIf you don’t get such a clientId/consent from IT, you can still use the skill with a Consumer account.