OneDrive Files
Access OneDrive and SharePoint via Microsoft Graph API with managed OAuth authentication. Browse files, search folders, inspect details, create folders, share links, upload files, and manage drive metadata.
This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Microsoft Graph access yourself.
Setup in 3 Steps
| Step 1: Install | Step 2: Pair Account | Step 3: Connect OneDrive |
|:---:|:---:|:---:|
|
|
| App-specific connection GIF coming soon |
| Run the install command in OpenClaw | Sign in and approve the device | Open the dashboard and connect OneDrive |
How It Works
┌─────────────────┐ ┌──────────────┐ ┌──────────────────┐
│ OpenClaw │────▶│ ClawLink │────▶│ Microsoft Graph │
│ (User Chat) │ │ (OAuth) │ │ (OneDrive API) │
└─────────────────┘ └──────────────┘ └──────────────────┘
│ │ │
│ 1. Install Plugin │ │
│ 2. Pair Device │ │
│ 3. Connect OneDrive │ │
│ │ 4. Secure Token │
│ │ 5. Proxy Requests │
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ SKILL │ │ Dashboard│ │ OneDrive│
│ File │ │ Auth │ │ /SharePt│
└──────────┘ └──────────┘ └──────────┘
Install
Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.
openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart
Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for OneDrive again."
Quick Start
# List items in OneDrive root
clawlink_call_tool --tool "one_drive_onedrive_list_items" --params '{}'
# Search for files
clawlink_call_tool --tool "one_drive_search_items" --params '{"query": "report.xlsx"}'
# Get file metadata
clawlink_call_tool --tool "one_drive_get_item" --params '{"item_id": "FILE_ID"}'
Authentication
All OneDrive tool calls are authenticated automatically by ClawLink using the user's connected Microsoft account.
No API key is required in chat. ClawLink stores the OAuth token securely and injects it into every Microsoft Graph request on the user's behalf.
Getting Connected
- Install the ClawLink plugin (see Install above).
- Pair the plugin with
clawlink_begin_pairingif it is not configured yet. - Open https://claw-link.dev/dashboard?add=onedrive and connect OneDrive.
- Call
clawlink_list_integrationsto verify the connection is active.
Connection Management
List Connections
clawlink_list_integrations
Response: Returns all connected integrations. Look for onedrive in the list.
Verify Connection
clawlink_list_tools --integration onedrive
Response: Returns the live tool catalog for OneDrive.
Reconnect
If OneDrive tools are missing or the connection shows an error:
- Direct the user to https://claw-link.dev/dashboard?add=onedrive
- After they confirm, call
clawlink_list_integrationsto verify - Then call
clawlink_list_tools --integration onedrive
Security& Permissions
- Access is scoped to files, folders, and drive data within the connected Microsoft account.
- All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
- Destructive actions (delete file, remove sharing permission) must be confirmed.
- Sharing link creation grants external access — confirm the recipient and permission level.
Tool Reference
Drive & Item Operations
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_list_drives | List all drives accessible to the authenticated user | Read |
| one_drive_get_drive | Get drive properties by ID | Read |
| one_drive_get_root | Get the root folder of the user's OneDrive | Read |
| one_drive_get_item | Get file or folder metadata by ID | Read |
| one_drive_get_item_permissions | List permissions on a file or folder | Read |
| one_drive_get_item_thumbnails | Get thumbnail URLs for a file | Read |
| one_drive_get_item_versions | Get version history of a file | Read |
| one_drive_list_folder_children | List contents of a folder by ID or path | Read |
| one_drive_list_root_drive_changes | Track changes in the drive root via delta token | Read |
| one_drive_search_items | Search files and folders by keyword | Read |
| one_drive_get_recent_items | Get recently accessed files | Read |
| one_drive_get_shared_items | Get items shared with the user | Read |
| one_drive_preview_drive_item | Generate a short-lived preview URL for a file | Read |
File & Folder Management
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_onedrive_list_items | List files and folders in OneDrive root | Read |
| one_drive_onedrive_find_file | Find a file in a specific folder | Read |
| one_drive_onedrive_find_folder | Find folders by name | Read |
| one_drive_onedrive_create_folder | Create a new folder in OneDrive | Write |
| one_drive_onedrive_create_text_file | Create a text file in OneDrive | Write |
| one_drive_onedrive_upload_file | Upload a file to OneDrive | Write |
| one_drive_move_item | Move a file or folder to a new location | Write |
| one_drive_copy_item | Copy a file or folder to a new location | Write |
| one_drive_update_drive_item_metadata | Update file/folder metadata (rename, move) | Write |
| one_drive_update_file_content | Update file content via upload session | Write |
| one_drive_delete_item | Delete a file or folder (moves to recycle bin) | Write |
| one_drive_delete_item_permanently | Permanently delete a file or folder | Write |
Sharing & Permissions
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_create_link | Create a sharing link for a file or folder | Write |
| one_drive_invite_user_to_item | Invite a user to access a file or folder | Write |
| one_drive_grant_share_permission | Grant access via a sharing URL | Write |
| one_drive_create_item_permission | Create a permission on an item | Write |
| one_drive_delete_item_permission | Remove a permission from an item | Write |
| one_drive_update_drive_items_permissions | Update permission roles | Write |
| one_drive_list_share_permissions | List permissions from a sharing URL | Read |
Check In / Check Out
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_checkout_item | Check out a file to prevent others from editing | Write |
| one_drive_checkin_item | Check in a previously checked-out file | Write |
| one_drive_discard_checkout | Discard checkout and discard changes | Write |
Site & SharePoint Operations
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_get_site | Get SharePoint site metadata | Read |
| one_drive_get_site_page_content | Get SharePoint site page content | Read |
| one_drive_list_site_lists | List SharePoint lists in a site | Read |
| one_drive_list_site_subsites | List subsites of a SharePoint site | Read |
| one_drive_list_site_columns | List column definitions for a SharePoint site | Read |
| one_drive_get_sharepoint_list_items | Get items from a SharePoint list | Read |
| one_drive_get_group_drive | Get the document library for a Microsoft 365 group | Read |
Download & Conversion
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_download_file | Download a file by ID (returns S3 URL) | Read |
| one_drive_download_file_by_path | Download a file by path | Read |
| one_drive_download_item_as_format | Download a file converted to PDF or HTML | Read |
| one_drive_download_item_version | Download a specific previous version of a file | Read |
Following & Activity
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_follow_item | Follow a file or folder | Write |
| one_drive_unfollow_item | Stop following a file or folder | Write |
| one_drive_get_followed_item | Get a followed item | Read |
| one_drive_list_activities | Get recent activity on the drive | Read |
| one_drive_list_item_activities | Get activities for a specific item | Read |
Sharing URL Resolution
| Tool | Description | Mode |
|------|-------------|------|
| one_drive_get_drive_item_by_sharing_url | Resolve a sharing URL to item metadata | Read |
| one_drive_get_share | Get a shared item by share ID | Read |
Code Examples
List files in a folder
clawlink_call_tool --tool "one_drive_list_folder_children" \
--params '{
"item_id": "FOLDER_ID"
}'
Search for files
clawlink_call_tool --tool "one_drive_search_items" \
--params '{
"query": "quarterly report",
"filter": "file neq null"
}'
Create a sharing link
clawlink_call_tool --tool "one_drive_create_link" \
--params '{
"item_id": "FILE_ID",
"type": "view",
"scope": "organization"
}'
Upload a file
clawlink_call_tool --tool "one_drive_onedrive_upload_file" \
--params '{
"parent_folder_id": "FOLDER_ID",
"file_name": "document.pdf",
"file_content": "BASE64_ENCODED_CONTENT"
}'
Move a file
clawlink_call_tool --tool "one_drive_move_item" \
--params '{
"item_id": "FILE_ID",
"parent_folder_id": "NEW_FOLDER_ID"
}'
Discovery Workflow
- Call
clawlink_list_integrationsto confirm OneDrive is connected. - Call
clawlink_list_tools --integration onedriveto see the live catalog. - Treat the returned list as the source of truth. Do not guess or assume what tools exist.
- If the user describes a capability but the exact tool is unclear, call
clawlink_search_toolswith a short query and integrationonedrive. - If no OneDrive tools appear, direct the user to https://claw-link.dev/dashboard?add=onedrive.
Execution Workflow
┌─────────────────────────────────────────────────────────────┐
│ READ OPERATIONS (Safe) │
│ list → get → search → describe → call │
│ │
│ Example: List folder → Get file → Show metadata │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ WRITE OPERATIONS (Require Confirmation) │
│ list → get → describe → preview → confirm → call │
│ │
│ Example: Describe tool → Preview changes → User approves │
│ → Execute update │
└─────────────────────────────────────────────────────────────┘
- For unfamiliar tools, ambiguous requests, or any write action, call
clawlink_describe_toolfirst. - Use the returned guidance, schema,
whenToUse,askBefore,safeDefaults,examples, andfollowupsto shape the call. - Prefer read, list, search, and get operations before writes when that reduces ambiguity.
- For writes or anything marked as requiring confirmation, call
clawlink_preview_toolfirst. - Execute with
clawlink_call_tool. Pass confirmation only after the preview matches the user's intent. - If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.
Notes
- Item IDs containing
{and}must be URL-encoded (%7Band%7D) in raw Graph URLs. ClawLink handles this automatically. - Large file uploads (>4 MB) use chunked upload sessions — do not assume the upload is complete immediately.
- Deleted items are moved to the recycle bin, not permanently deleted, unless using
delete_item_permanently. - Sharing links have independent availability — thumbnail URLs are external HTTP endpoints.
- Rate limit errors (HTTP 429) include a
Retry-Afterheader — use exponential backoff.
Error Handling
| Status / Error | Meaning |
|----------------|---------|
| Tool not found | The tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration onedrive. |
| Missing connection | OneDrive is not connected. Direct the user to https://claw-link.dev/dashboard?add=onedrive. |
| ItemNotFound | File or folder does not exist. Check the item_id or path. |
| nameAlreadyExists | A file or folder with that name already exists at the destination. |
| InvalidArgument | Invalid parameter or missing required field. Review the tool schema with clawlink_describe_tool. |
| Write rejected | User did not confirm a write action. Always confirm before executing writes. |
Troubleshooting: Tools Not Visible
- Check that the ClawLink plugin is installed:
openclaw plugins list - If the plugin is installed but tools are missing, tell the user to send
/newas a standalone message to reload the catalog. - If a fresh chat does not help, run:
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json openclaw gateway restart - After restart, tell the user to send
/newagain and retry.
Troubleshooting: Invalid Tool Call
- Ensure the integration slug is exactly
onedrive. - Use
clawlink_describe_toolto verify parameter names and types before calling. - For write operations, always call
clawlink_preview_toolfirst.
Resources
- Microsoft Graph OneDrive API Overview
- DriveItem Resource
- SharePoint REST API
- ClawLink: https://claw-link.dev/?utm_source=clawhub&utm_medium=referral&utm_content=onedrive-files
- ClawLink Docs: https://docs.claw-link.dev/openclaw
- ClawLink Verification: https://claw-link.dev/verify
Related Skills
- Microsoft Excel — For Excel workbook operations
- Outlook Inbox — For Outlook email and calendar
- OneNote Notes — For OneNote notebook operations
- SharePoint Sites — For SharePoint site operations
Powered by ClawLink — an integration hub for OpenClaw

Scan to join WeChat group