Microsoft Graph API integration for OpenClaw agents - manage email, calendar, and tasks
Project description
OfficeClaw
Microsoft Graph API integration for OpenClaw agents — manage email, calendar, and tasks.
Overview
Officeclaw is an OpenClaw skill that enables AI agents to interact with personal Microsoft accounts through the Microsoft Graph API. Agents can read/write emails, manage calendar events, and handle tasks — all through natural language commands.
What Can Officeclaw Do?
- 📧 Email — Read inbox, send emails, mark read/unread, archive
- 📅 Calendar — View events, create meetings, manage appointments
- ✅ Tasks — Manage Microsoft To Do lists, create/complete tasks
Quick Start
Installation
pip install officeclaw
Setup
-
Create Azure App Registration (one-time setup)
See docs/setup.md for detailed instructions.
-
Configure credentials
# Create .env file cp .env.template .env # Edit with your Azure app credentials OFFICECLAW_CLIENT_ID=your-client-id OFFICECLAW_CLIENT_SECRET=your-client-secret
-
Authenticate
officeclaw auth login
Usage
# List recent emails
officeclaw mail list --limit 10
# View calendar
officeclaw calendar list --start 2026-02-01 --end 2026-02-28
# List task lists
officeclaw tasks list-lists
# Create a task
officeclaw tasks create --list-id <id> --title "Review report"
# JSON output (for agents)
officeclaw --json mail list
For OpenClaw Agents
Once installed, OpenClaw agents can use Officeclaw through natural language:
User: "Show me today's calendar"
Agent: [Uses Officeclaw]
You have 3 events today:
- 9:00 AM: Team standup
- 2:00 PM: Client call
- 4:00 PM: Project review
User: "Add 'finish report' to my tasks"
Agent: [Uses Officeclaw]
✓ Task created: finish report
See skill/SKILL.md for the full skill manifest.
Commands
Authentication
| Command | Description |
|---|---|
officeclaw auth login |
Authenticate with Microsoft |
officeclaw auth logout |
Clear stored tokens |
officeclaw auth status |
Show authentication status |
| Command | Description |
|---|---|
officeclaw mail list |
List messages |
officeclaw mail get <id> |
Get message details |
officeclaw mail send --to <email> --subject <subj> --body <body> |
Send email |
Calendar
| Command | Description |
|---|---|
officeclaw calendar list --start <date> --end <date> |
List events |
officeclaw calendar create --subject <subj> --start <dt> --end <dt> |
Create event |
Tasks
| Command | Description |
|---|---|
officeclaw tasks list-lists |
List task lists |
officeclaw tasks list --list-id <id> |
List tasks |
officeclaw tasks create --list-id <id> --title <title> |
Create task |
officeclaw tasks complete --list-id <id> --task-id <id> |
Complete task |
officeclaw tasks reopen --list-id <id> --task-id <id> |
Reopen task |
Configuration
Environment variables (or .env file):
| Variable | Required | Description |
|---|---|---|
OFFICECLAW_CLIENT_ID |
Yes | Azure app client ID |
OFFICECLAW_CLIENT_SECRET |
Yes | Azure app client secret |
OFFICECLAW_REDIRECT_URI |
No | Redirect URI (default: http://localhost:8000/callback) |
OFFICECLAW_TENANT_ID |
No | Tenant ID (default: consumers) |
Security
- Tokens stored securely — System keyring (macOS Keychain, Windows Credential Manager) or encrypted file
- No data storage — Officeclaw passes data through, never stores emails/events
- No telemetry — No usage data collected
See SECURITY.md for full security documentation.
Development
# Clone and install
git clone https://github.com/danielithomas/officeclaw.git
cd officeclaw
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/ tests/
black --check src/ tests/
License
Apache License 2.0 — see LICENSE
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file officeclaw-1.0.0.tar.gz.
File metadata
- Download URL: officeclaw-1.0.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f21e55d1d9b361d796d267237a2a4b0ee3b2c972eae87c9b99bd53336facd82
|
|
| MD5 |
e07b133f105b66310153ea7da84a3676
|
|
| BLAKE2b-256 |
b18130226b4d86f564dd975bcf89015aca7cbb32cdd8d12409f61bcc40d6d36b
|
Provenance
The following attestation bundles were made for officeclaw-1.0.0.tar.gz:
Publisher:
publish.yml on danielithomas/officeclaw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
officeclaw-1.0.0.tar.gz -
Subject digest:
1f21e55d1d9b361d796d267237a2a4b0ee3b2c972eae87c9b99bd53336facd82 - Sigstore transparency entry: 953647534
- Sigstore integration time:
-
Permalink:
danielithomas/officeclaw@5e577393ef7bfe3904f46354af35439867758c7e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/danielithomas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e577393ef7bfe3904f46354af35439867758c7e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file officeclaw-1.0.0-py3-none-any.whl.
File metadata
- Download URL: officeclaw-1.0.0-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4faa44ea10c16fd0ff96b80a16a95a8963c1c85db9d4a91812d3fa04a45e1d
|
|
| MD5 |
4ec0f9f3ecbb1dda4ebc34415c9a85cb
|
|
| BLAKE2b-256 |
7d8ff4ba58e91b3962e9b9eeac13a7f58495df5f7182160672491c222ba52c64
|
Provenance
The following attestation bundles were made for officeclaw-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on danielithomas/officeclaw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
officeclaw-1.0.0-py3-none-any.whl -
Subject digest:
4c4faa44ea10c16fd0ff96b80a16a95a8963c1c85db9d4a91812d3fa04a45e1d - Sigstore transparency entry: 953647535
- Sigstore integration time:
-
Permalink:
danielithomas/officeclaw@5e577393ef7bfe3904f46354af35439867758c7e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/danielithomas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e577393ef7bfe3904f46354af35439867758c7e -
Trigger Event:
workflow_dispatch
-
Statement type: