Install
openclaw skills install olkMicrosoft Outlook and OneDrive CLI for email, calendar, contacts, tasks, and files via Microsoft Graph API.
openclaw skills install olkUse olk for Outlook Mail/Calendar/Contacts/Tasks and OneDrive files. Works with personal Microsoft accounts and enterprise Azure AD/Entra ID.
Setup (once)
olk auth login — device-code OAuth2 flow for personal accounts (opens browser)olk auth login --enterprise — login with enterprise scopes for work/school accounts (enables OOO, inbox rules, directory search)olk auth login --client-id ID --tenant-id ID — enterprise custom app registrationolk auth list — list authenticated accountsolk auth status — check token validityolk auth logout [EMAIL] — remove stored credentialsolk auth clean --force — remove ALL stored accounts and tokensolk mail list [-n 25] [-f FOLDER] [-u] [--from SENDER] [--after DATE] [--before DATE] [--focused] [--other]olk mail get <ID> [--format full|text|html]olk mail send --to a@b.com --subject "Hi" --body "Hello"olk mail send --to a@b.com --subject "Hi" --body "<p>Hello</p>" --htmlecho "Hello" | olk mail send --to a@b.com --subject "Hi"olk mail send --to a@b.com --to b@c.com --cc d@e.com --subject "Hi" --body "Hello"olk mail send --to a@b.com --subject "Report" --body "See attached" --attach report.pdf --attach data.csvolk mail send --to a@b.com --subject "Urgent" --body "ASAP" --importance higholk mail send --to a@b.com --subject "Contract" --body "Please review" --read-receiptolk mail search "from:boss@co.com subject:urgent" [-n 25]olk mail reply <ID> --body "Thanks"olk mail reply <ID> --body "Thanks" --reply-allolk mail forward <ID> --to a@b.com [--comment "FYI"]olk mail move <ID> <FOLDER>olk mail delete <ID> --forceolk mail mark <ID> --read or olk mail mark <ID> --unreadolk mail foldersolk mail folders create -n "Project X"olk mail folders rename <FOLDER_ID> -n "New Name"olk mail folders delete <FOLDER_ID> --forceolk mail attachments <ID>olk mail attachments <ID> --save [--out DIR]olk mail attachments <ID> --attachment-id <ATT_ID> [--out DIR]Drafts
olk mail drafts list [-n 25]olk mail drafts create --to a@b.com --subject "Draft" --body "WIP" [--cc X] [--bcc X] [--html]echo "WIP" | olk mail drafts create --to a@b.com --subject "Draft"olk mail drafts send <DRAFT_ID>olk mail drafts delete <DRAFT_ID> --forceFlags & Categories
olk mail flag <ID> flagged|complete|notFlaggedolk mail importance <ID> low|normal|higholk mail categorize <ID> -c "Red Category" -c "Blue Category"olk mail categorize <ID> -c noneolk mail categories listolk mail categories create -n "My Category" [--preset preset0]olk mail categories delete <ID> --forcenone, preset0 (red) through preset24Out-of-Office (enterprise/work accounts only — requires olk auth login --enterprise)
olk mail ooo getolk mail ooo set --message "I'm out of office"olk mail ooo set --message "On vacation" --start 2026-04-10 --end 2026-04-17 [--audience none|contactsOnly|all]olk mail ooo set --message "Internal msg" --external-message "External msg"olk mail ooo offInbox Rules (enterprise/work accounts only — requires olk auth login --enterprise)
olk mail rules listolk mail rules create --name "Archive boss" --from boss@co.com --move Archiveolk mail rules create --name "Auto-read newsletters" --subject-contains "newsletter" --mark-readolk mail rules create --name "Forward invoices" --subject-contains "invoice" --forward-to accounting@co.comolk mail rules delete <RULE_ID> --forceFocused Inbox
olk mail list --focusedolk mail list --otherolk mail list --focused --unreadWell-known folder names: inbox, sentitems, drafts, deleteditems, junkemail, archive.
Calendar
olk calendar events [-d DAYS] [--after DATE] [--before DATE] [--calendar ID] [-n 25]olk calendar get <ID>olk calendar create --subject "Standup" --start 2025-06-15T09:00 --end 2025-06-15T09:30olk calendar create --subject "Sync" --start 2025-06-15T10:00 --end 2025-06-15T10:30 --attendees a@b.com --attendees c@d.comolk calendar create --subject "Offsite" --start 2025-06-15 --end 2025-06-16 --all-dayolk calendar create --subject "Call" --start 2025-06-15T14:00 --end 2025-06-15T14:30 --online-meetingolk calendar create --subject "Standup" --start 2025-06-15T09:00 --end 2025-06-15T09:15 -r dailydaily, weekdays (Mon-Fri), weekly, monthly, yearlyolk calendar update <ID> [--subject X] [--start Y] [--end Z] [--location L]olk calendar delete <ID> --forceolk calendar respond <ID> accept|decline|tentativeolk calendar calendarsolk calendar availability --emails user@co.com [--emails user2@co.com] [-d DAYS] [--after DATE] [--before DATE]olk calendar view [-d 7] [--after DATE] [--before DATE] [--calendar ID] [-n 50]olk calendar find-times --attendees a@b.com --attendees c@d.com [-d 60] [--after DATE] [--before DATE]People / Directory
olk people search "john" [-n 25]olk people search "Jane Smith"Contacts
olk contacts list [-n 25] [--skip N] [--sort displayName|givenName|surname]olk contacts get <ID>olk contacts create --first-name John --last-name Doe [-e j@d.com] [-e backup@d.com] [-p 555-1234] [--business-phone P] [--home-phone P] [--company Acme] [--title Engineer] [--department D] [--manager M] [--birthday YYYY-MM-DD] [--notes N] [--middle-name M] [--nickname N] [-g CATEGORY] [--street S] [--city C] [--state S] [--postal-code P] [--country C] [--address-type business|home|other]olk contacts update <ID> [--first-name X] [--last-name Y] [-e EMAIL]... [-p MOBILE] [--business-phone P] [--home-phone P] [--company C] [--title T] [--department D] [--manager M] [--birthday YYYY-MM-DD] [--notes N] [--middle-name M] [--nickname N] [-g CATEGORY]... [--street S] [--city C] [--state S] [--postal-code P] [--country C] [--address-type business|home|other]olk contacts delete <ID> --forceolk contacts search "John" [-n 25]Tasks (Microsoft To Do)
olk todo listsolk todo lists create -n "Project Tasks"olk todo lists delete <LIST_ID> --forceolk todo list [--list LIST_ID] [-n 25] [--status notStarted|inProgress|completed|waitingOnOthers|deferred]olk todo get <TASK_ID> [--list LIST_ID]olk todo create --title "Buy groceries" [--due 2026-04-15] [--start 2026-04-10] [--importance low|normal|high] [--body "Notes"] [--reminder 2026-04-14T09:00] [--recurrence daily|weekdays|weekly|monthly|yearly] [-c "Work" -c "Urgent"] [--list LIST_ID]olk todo update <TASK_ID> [--title X] [--due DATE] [--start DATE] [--importance low|normal|high] [--body TEXT] [--reminder DATETIME] [--recurrence PATTERN] [-c CATEGORY] [--list LIST_ID]olk todo complete <TASK_ID> [--list LIST_ID]olk todo delete <TASK_ID> --force [--list LIST_ID]Checklist Items
olk todo checklist list <TASK_ID> [--list LIST_ID]olk todo checklist create <TASK_ID> -n "Step 1" [--list LIST_ID]olk todo checklist toggle <TASK_ID> <ITEM_ID> [--list LIST_ID]olk todo checklist update <TASK_ID> <ITEM_ID> -n "New name" [--list LIST_ID]olk todo checklist delete <TASK_ID> <ITEM_ID> --force [--list LIST_ID]Task Attachments
olk todo attach list <TASK_ID> [--list LIST_ID]olk todo attach upload <TASK_ID> <FILE> [--list LIST_ID]olk todo attach download <TASK_ID> <ATTACHMENT_ID> [--out DIR] [--list LIST_ID]olk todo attach delete <TASK_ID> <ATTACHMENT_ID> --force [--list LIST_ID]Linked Resources
olk todo links list <TASK_ID> [--list LIST_ID]olk todo links create <TASK_ID> -n "Resource name" [--url URL] [--app-name APP] [--external-id ID] [--list LIST_ID]olk todo links delete <TASK_ID> <RESOURCE_ID> --force [--list LIST_ID]If --list is omitted, the default (first) task list is used automatically.
OneDrive
olk drive listolk drive info [--drive-id ID]olk drive ls [PATH] [--drive-id ID] [-n 50]olk drive get <ID> [--drive-id ID]olk drive search <QUERY> [--drive-id ID] [-n 25]olk drive recent [--drive-id ID]olk drive shared [--drive-id ID]olk drive download <ID> [--out DIR] [--drive-id ID]olk drive upload <LOCAL_PATH> <REMOTE_PATH> [--drive-id ID] [--replace]olk drive mkdir <PATH> [--drive-id ID]olk drive cp <ID> <DEST_PATH> [--name NEW_NAME] [--drive-id ID]olk drive mv <ID> <DEST_PATH> [--drive-id ID]olk drive rm <ID> --force [--drive-id ID]olk drive share <ID> [--type view|edit] [--scope anonymous|organization] [--drive-id ID]olk drive versions <ID> [--drive-id ID]If --drive-id is omitted, the user's primary drive is used automatically.
Configuration
olk config set timezone America/New_Yorkolk config get timezone--tz flag > OLK_TIMEZONE env > config file > system local"timezone" fieldUser Profile
olk whoami — display current user's name, email, job title, department, office, phoneShortcuts
olk send ... → olk mail send ...olk ls ... → olk mail list ...olk inbox ... → olk mail list ...olk search <Q> → olk mail search <Q>olk today → olk calendar events --days 1olk week → olk calendar events --days 7Output Formats
--json: JSON envelope { results, count, nextLink }.--json --results-only: bare JSON array (best for scripting).--plain: tab-separated values for piping to awk, cut.--select from,subject: comma-separated field projection.Global Flags
--json — JSON output (env: OLK_JSON)--plain — TSV output (env: OLK_PLAIN)--account EMAIL — use a specific account (env: OLK_ACCOUNT)--results-only — unwrap JSON envelope (env: OLK_RESULTS_ONLY)--select FIELDS — field projection (env: OLK_SELECT)--force — skip confirmations (env: OLK_FORCE)--dry-run — preview without executing (env: OLK_DRY_RUN)-v, --verbose — verbose output (env: OLK_VERBOSE)--color auto|never|always — color mode (env: OLK_COLOR)--timeout SECONDS — request timeout, default 60 (env: OLK_TIMEOUT)--tz TIMEZONE — IANA time zone for display, e.g. America/New_York, UTC, Local (env: OLK_TIMEZONE)Scripting Examples
olk mail list --unread --json --results-only | jq lengtholk today --json --results-only | jq -r '.[].subject'olk contacts list --plain --select name,emailolk send --to ops@co.com --subject "Deploy done" --body "$(date): v1.2.3 deployed"olk send --to boss@co.com --subject "Report" --attach report.pdfolk mail list --json --results-only | jq -r '.[] | select(.isRead == false) | "\(.from): \(.subject)"'olk mail attachments <ID> --save --out ./downloadsolk calendar availability --emails colleague@co.com --json --results-only | jq '.[] | .items'olk todo list --status notStarted --json --results-only | jq -r '.[].title'olk mail ooo set --message "On vacation until April 17" --start 2026-04-10 --end 2026-04-17olk mail rules list --json --results-only | jq -r '.[] | select(.isEnabled) | .displayName'olk calendar find-times --attendees a@b.com --attendees c@d.com --json --results-only | jq '.[0]'olk people search "engineering" --json --results-only | jq -r '.[].email'olk mail list --focused --unread --json --results-only | jq lengtholk drive ls /Documents --json --results-only | jq '[.[] | select(.size > 10000000)] | sort_by(.size) | reverse'olk drive info --json --results-only | jq '{used: .quotaUsed, total: .quotaTotal}'Notes
OLK_TIMEZONE=America/New_York to display times in your timezone.OLK_ACCOUNT=you@example.com to avoid repeating --account.OLK_TODO_LIST=<list-id> to avoid repeating --list for todo commands.OLK_DRIVE_ID=<drive-id> to avoid repeating --drive-id for drive commands.OLK_KEYRING_PASSWORD=<password> for headless/non-interactive environments (file-backend keyring).--json --results-only plus jq.list or search first — never guess.2025-06-15 or 2025-06-15T09:00.from:, to:, subject:, hasAttachment:, received>=.--body is omitted from mail send or mail drafts create, body is read from stdin.delete) require --force or will prompt for confirmation.olk auth status first.olk auth login --enterprise.olk auth login) if you authenticated before OneDrive support was added.brew install rlrghb/tap/olk