office365-connectorOffice 365 / Outlook connector for email (read/send), calendar (read/write), and contacts (read/write) using resilient OAuth authentication. NOW WITH MULTI-ACCOUNT SUPPORT! Manage multiple Microsoft 365 identities from a single skill. Solves the difficulty connecting to Office 365 email, calendar, and contacts. Uses Microsoft Graph API with comprehensive Azure App Registration setup guide. Perfect for accessing your Microsoft 365/Outlook data from OpenClaw.
Install via ClawdBot CLI:
clawdbot install tirandagan/office365-connectorThis skill provides resilient, production-ready connection to Office 365 / Outlook services including email, calendar, and contacts. Now with multi-account support (v2.0.0), you can manage multiple Microsoft 365 identities (work, personal, consulting, etc.) from a single skill installation.
It solves the common challenge of connecting to Office 365 from automation tools by providing OAuth authentication, automatic token refresh, per-account isolation, and comprehensive Azure App Registration setup guidance.
Perfect for:
New in v2.0.0: Multi-account support! See MULTI-ACCOUNT.md for complete usage guide.
Attribution: Enhanced by Matthew Gordon (matt@workandthrive.ai) - See CREDITS.md for full attribution.
Major Enhancements by Matthew Gordon:
--account=name flag across all operationsSee CHANGELOG.md for complete version history.
cd skills/office365-connector
# Add account
node accounts.js add work <tenant-id> <client-id> <client-secret> you@work.com "Work account"
# Authenticate
node auth.js login --account=work
# Add personal account
node accounts.js add personal <tenant> <client> <secret> you@outlook.com "Personal"
# Add consulting account
node accounts.js add consulting <tenant> <client> <secret> you@client.com "Consulting"
# Set default
node accounts.js default work
# List all accounts
node accounts.js list
# Check work calendar
node calendar.js today --account=work
# Read personal emails
node email.js recent 10 --account=personal
# Send from consulting account
node send-email.js send client@example.com "Subject" "Body" --account=consulting
Already using v1.0.0? No problem!
# Import your existing setup
node accounts.js import-legacy
# Continue using without changes (environment variables still work)
# OR add additional accounts
node accounts.js add secondary <tenant> <client> <secret>
Before using this skill, you must complete the Azure App Registration setup to obtain:
Setup time: ~10-15 minutes per account
See Setup Guide for complete step-by-step instructions.
This skill requires the following delegated permissions (user consent required):
Mail.Read - Read user emailMail.ReadWrite - Read and write access to user emailMail.Send - Send email as the userCalendars.Read - Read user calendarsCalendars.ReadWrite - Read and write access to user calendarsContacts.Read - Read user contactsContacts.ReadWrite - Read and write access to user contactsUser.Read - Sign in and read user profileoffline_access - Maintain access to data (refresh tokens)IMPORTANT: Before proceeding with setup, confirm that you understand and approve these permissions. Each permission grants specific access to your Microsoft 365 data.
See Permissions Reference for detailed information about what each permission allows.
Accounts are stored in ~/.openclaw/auth/office365-accounts.json with tokens in ~/.openclaw/auth/office365/.
Use the accounts.js CLI to manage:
node accounts.js list # List all accounts
node accounts.js add <name> ... # Add account
node accounts.js remove <name> # Remove account
node accounts.js default <name> # Set default
Environment variables still work for single-account use:
export AZURE_TENANT_ID="your-tenant-id"
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
Or in OpenClaw config:
{
"env": {
"vars": {
"AZURE_TENANT_ID": "your-tenant-id",
"AZURE_CLIENT_ID": "your-client-id",
"AZURE_CLIENT_SECRET": "your-client-secret"
}
}
}
This skill uses OAuth 2.0 Device Code Flow for resilient authentication:
Token storage: Tokens are securely stored in ~/.openclaw/auth/office365/ with mode 0600 (owner read/write only).
# Read from default account
node email.js recent 10
# Read from specific account
node email.js recent 10 --account=work
# Search in consulting account
node email.js search "proposal" --account=consulting
# Send from appropriate identity
node send-email.js send client@example.com "Update" "..." --account=consulting
# Check work calendar
node calendar.js today --account=work
# Check personal calendar
node calendar.js week --account=personal
# List all configured accounts
node accounts.js list
# Check authentication status
node auth.js status --account=work
# Re-authenticate if needed
node auth.js login --account=work
Perfect when working across multiple organizations:
# Morning: Check all calendars
node calendar.js today --account=work
node calendar.js today --account=consulting
node calendar.js today --account=startup
# Process emails by identity
node email.js recent --account=work
node email.js recent --account=consulting
# Send from appropriate account
node send-email.js send client@bigcorp.com "Proposal" "..." --account=work
# Work hours: Work account
node calendar.js today --account=work
node email.js recent --account=work
# After hours: Personal account
node email.js recent --account=personal
The skill includes robust error handling for:
Microsoft Graph API has rate limits:
The skill automatically handles throttling with exponential backoff.
"No account specified and no default account set"
# Set a default account
node accounts.js default work
# Or always specify --account=
node calendar.js today --account=work
"Account not found"
# List available accounts
node accounts.js list
# Add the missing account
node accounts.js add <name> <tenant> <client> <secret>
Authentication expired
# Check status
node auth.js status --account=work
# Re-authenticate
node auth.js login --account=work
"AADSTS700016: Application not found in directory"
"AADSTS65001: User did not consent"
"AADSTS700082: Expired refresh token"
"403 Forbidden"
See Setup Guide and MULTI-ACCOUNT.md for detailed troubleshooting.
node accounts.js list # List all accounts
node accounts.js add <name> <tenant> <client> <secret> [email] [desc]
node accounts.js remove <name> # Remove account
node accounts.js default <name> # Set default
node accounts.js import-legacy # Import v1.0.0 setup
node auth.js login [--account=name] # Authenticate
node auth.js status [--account=name] # Check status
node auth.js token [--account=name] # Get access token
node email.js recent [count] [--account=name]
node email.js search "query" [--account=name]
node email.js from email@domain [--account=name]
node email.js read <id> [--account=name]
node calendar.js today [--account=name]
node calendar.js week [--account=name]
node send-email.js send <to> <subject> <body> [--account=name]
node send-email.js reply <message-id> <body> [--account=name]
node cancel-event.js <event-id> [comment] [--account=name]
Original Skill: office365-connector v1.0.0 from ClawHub Community
Multi-Account Enhancement (v2.0.0): Matthew Gordon (matt@workandthrive.ai)
Thank you to Matthew Gordon for contributing the multi-account enhancement that makes this skill significantly more useful for consultants, freelancers, and anyone managing multiple work identities!
See CREDITS.md for complete attribution.
Maintains compatibility with the original skill's licensing. See CREDITS.md for details.
Generated Mar 1, 2026
Consultants juggling multiple clients can use this skill to manage separate email, calendar, and contacts for each client account. It enables sending emails from client-specific addresses and scheduling meetings without mixing up identities, improving professionalism and organization.
Professionals can separate work and personal communications by using distinct accounts for each. Automate email filtering, schedule personal appointments from a personal calendar, and sync contacts while keeping data isolated, reducing stress and enhancing productivity.
Teams can access shared mailboxes and delegated calendars through multiple accounts within a single skill. This supports collaborative email management, event coordination, and contact sharing across departments or projects without manual switching.
Freelancers working on various projects can manage different email accounts for each project, send project-specific communications, and track deadlines in separate calendars. This helps maintain clear records and streamline client interactions.
IT departments can use multiple accounts to monitor service emails, manage support tickets, and schedule maintenance events across different systems. It allows for automated responses and centralized logging without compromising security.
Offer a managed service where businesses pay a monthly fee to automate their Office 365 tasks, such as email sorting, calendar management, and contact synchronization across multiple accounts. Revenue comes from tiered subscriptions based on the number of accounts or features.
Provide one-time consulting services to help clients set up and configure the skill, including Azure App Registration and multi-account integration. Revenue is generated through fixed-price packages or hourly rates for implementation and training.
Develop custom integrations for specific industries, such as CRM sync or workflow automation, leveraging the skill's API. Revenue comes from development contracts, licensing fees, or ongoing support agreements tailored to client needs.
💬 Integration Tip
Ensure proper Azure App Registration with delegated permissions for each account, and use the accounts.js CLI to manage tokens securely. Test multi-account switching in a sandbox environment first.
Interact with Google Calendar via the Google Calendar API – list upcoming events, create new events, update or delete them. Use this skill when you need programmatic access to your calendar from OpenClaw.
Read, search, and manage Outlook emails and calendar via Microsoft Graph API. Use when the user asks about emails, inbox, Outlook, Microsoft mail, calendar events, or scheduling.
Google Calendar via gcalcli: today-only agenda by default, bounded meaning-first lookup via agenda scans, and fast create/delete with verification--optimized for low tool calls and minimal output.
This skill should be used when interacting with Apple Calendar on macOS. Use it for listing calendars, viewing events, creating/updating/deleting calendar events, and checking availability/free-busy times. Triggers on requests like "check my calendar", "schedule a meeting", "what's on my schedule", "am I free tomorrow", or any calendar-related operations.
Access and manage Google Calendar events with gogcli for cross-calendar agendas, keyword search, and filtered outputs avoiding unwanted calendars like holidays.
Daily morning rollup of important emails and calendar events at 8am with AI-generated summaries