Skills & Plugins Productivity Skills

OpenClaw + Outlook: Automate Microsoft Email Without the Headaches

Connect OpenClaw to Outlook and Microsoft 365 to automate email triage, draft generation, calendar management, and meeting workflows. Full Microsoft Graph API setup guide.

SR
S. Rivera
Microsoft 365 Integration Specialist
2025-02-06 16 min 7.8k views
Updated Mar 2025
Key Takeaways
  • OpenClaw connects to Outlook via Microsoft Graph API — requires an Azure app registration, which takes 15 minutes
  • Supports email reading, drafting, sending, folder management, and calendar operations
  • Works with Microsoft 365 Business, E3/E5, and personal Outlook.com accounts
  • Admin consent is required for organization-wide deployment — individual use only needs user consent
  • Pair with the Summarize skill for automated email digest and triage workflows

Outlook is the most common business email platform, and it has one of the best automation APIs available. The Microsoft Graph API gives you deep access to email, calendar, contacts, and files — all through a single authentication layer. OpenClaw wraps this API cleanly. Once connected, your agents can read, draft, send, organize, and respond to email based on rules you define. Here's the complete setup process.

Microsoft Graph API Overview

The Microsoft Graph API is Microsoft's unified API surface for all Microsoft 365 services. One OAuth 2.0 token gives you access to Outlook mail and calendar, OneDrive files, Teams messages, SharePoint, and more. OpenClaw uses Graph for its Outlook skill, which means the same authentication setup unlocks multiple Microsoft services.

The key permissions you'll need for email automation:

  • Mail.Read — read emails in all mailbox folders
  • Mail.ReadWrite — read and modify emails (move, delete, mark as read)
  • Mail.Send — send emails on behalf of the user
  • Calendars.ReadWrite — read and create calendar events
  • offline_access — required for refresh token support (automatic token renewal)

Start with Mail.Read and Mail.Send. Add others as your workflows require them. Requesting fewer permissions makes admin consent easier to obtain in enterprise environments.

Azure App Registration

Go to portal.azure.com, navigate to Azure Active Directory → App registrations → New registration. Name your app, set the redirect URI to http://localhost:8080/oauth/callback for local setup, and create it.

Under API permissions, add the Microsoft Graph permissions listed above. For personal accounts, grant User consent. For organization-wide deployment, click "Grant admin consent" — this requires Global Administrator privileges.

Under Certificates & secrets, create a new client secret. Copy the value immediately — it won't show again.

# ~/.openclaw/config.yaml — Outlook skill
skills:
  outlook:
    enabled: true
    client_id: "${AZURE_CLIENT_ID}"
    client_secret: "${AZURE_CLIENT_SECRET}"
    tenant_id: "${AZURE_TENANT_ID}"     # "common" for personal accounts

    # Email configuration
    email:
      folders_to_monitor:
        - Inbox
        - "Customer Inquiries"          # custom folder name
      mark_as_read: true                # mark processed emails as read
      move_to_folder: "Processed"       # move after processing

    # Calendar configuration
    calendar:
      enabled: false                    # enable if you need calendar access
      default_calendar: "Calendar"

    # Draft configuration
    drafts:
      enabled: true
      save_to_drafts: true              # save AI drafts before sending
💡
Use "common" Tenant ID for Personal Accounts

If you're connecting a personal Outlook.com account rather than a work Microsoft 365 account, set tenant_id: "common" in your config. For organization accounts, use your actual Azure tenant ID from the Azure portal Overview page.

Email Automation Workflows

The highest-ROI email workflow for most teams is automated triage. New emails arrive in the inbox → agent reads and classifies them by intent (support question, sales inquiry, internal request, spam) → agent assigns priority → moves to the appropriate folder → creates a task in your project management tool for action items → sends an auto-acknowledgment if the classification warrants it.

This workflow works best with clear classification rules in your system prompt. Define your categories explicitly: "Support questions are emails asking how to use our product or reporting issues. Sales inquiries ask about pricing or want demos. Internal requests come from company email addresses." Clear categories produce reliable classification.

The second high-value workflow is draft generation. When a new email arrives that needs a response, the agent reads it, understands the context, and creates a draft reply in Outlook. The human reviews and sends the draft. This is faster than writing from scratch and catches most straightforward responses on the first try.

⚠️
Never Auto-Send Without Review

For external email, always route AI-generated responses through a human review step before sending. Set save_to_drafts: true and create a review process. Auto-sending is appropriate only for internal notifications or acknowledgment emails with pre-approved templates.

Calendar Integration

With Calendars.ReadWrite permission enabled, OpenClaw can read your upcoming events, create new meetings, and update existing calendar entries. Practical applications include: automatically creating follow-up meeting invites based on email threads, syncing meeting notes to calendar events, and building scheduling workflows that check availability before proposing times.

For scheduling automation, the agent reads the calendar to find open slots, proposes times to the external party via email, and creates the calendar event when the party confirms. This works well for high-volume meeting scheduling — demos, onboarding calls, interviews — where the scheduling coordination itself is the bottleneck.

Shared Mailbox Support

The Outlook skill supports shared mailboxes through delegated access. Grant your integration "Full Access" on the shared mailbox in Exchange Admin Center, then specify the shared mailbox address in your workflow config using user_id: "shared@yourdomain.com". The agent can then read, draft, and send from the shared mailbox as if it were the primary account.

This is the recommended pattern for team email addresses like support@, sales@, or info@. Route shared mailbox emails through OpenClaw for triage and auto-response, while keeping individual mailboxes for personal correspondence.

Common Mistakes

Missing offline_access scope causes token expiry failures. Without this permission, the OAuth token lasts 1 hour and the integration breaks after the first expiry. Always include offline_access in your permission request to enable automatic refresh.

Monitoring the entire inbox without filters creates overwhelming noise. Add a folder filter to monitor only specific folders, or use Graph API filter queries to process only unread emails from external senders. Starting narrow and expanding is always safer than starting broad and trying to add filters later.

FAQ

Does OpenClaw work with personal Outlook.com accounts?

Yes. Set tenant_id: "common" in your config to support personal Microsoft accounts. The setup is identical to organizational accounts, but you only need user consent rather than admin consent. Personal accounts have the same Graph API access for email and calendar operations.

Can OpenClaw read all my emails automatically?

Only with Mail.Read permission. By default, OpenClaw requests Mail.ReadWrite for full access. You can restrict it to specific folders by adding folder filters to your monitoring config, limiting what the agent actually processes even if the API permission is broad.

Does the Outlook skill support Exchange on-premises?

OpenClaw uses the Microsoft Graph API, which requires Exchange Online as part of Microsoft 365. On-premises Exchange Server is not supported. Hybrid Exchange environments work if Exchange Online is configured as the primary mailbox location.

Can OpenClaw send emails on my behalf?

Yes, with Mail.Send permission. Emails appear in your Sent Items with your address as the sender. For shared mailboxes, configure appropriate Send.As or Send on Behalf permissions in Azure AD and Exchange Admin Center before enabling auto-send.

How does calendar access work?

With Calendars.ReadWrite permission, OpenClaw can read events, create meetings, update existing events, and access attendee availability information. Use this to build meeting scheduling workflows that check availability and create invites automatically based on email conversations.

Is Microsoft 365 Business required?

No. Both Microsoft 365 Business and personal Microsoft accounts with Outlook support the Graph API and work with OpenClaw. Enterprise accounts (E3/E5) have more advanced features and require admin consent for organization-wide deployment.

SR
S. Rivera
Microsoft 365 Integration Specialist · aiagentsguides.com

S. Rivera has integrated OpenClaw with Microsoft 365 environments for enterprise teams. She documents every step from Azure app registration through production workflow deployment.

Get new guides every week.

Join 50,000 OpenClaw users. No spam, ever.