Install
openclaw skills install dropbox-integrationRead-only Dropbox integration for browsing, searching, and downloading files from your Dropbox account. Includes automatic OAuth token refresh, secure credential storage, and comprehensive setup guide. Perfect for accessing your Dropbox files from OpenClaw without giving write access.
openclaw skills install dropbox-integrationThis skill provides read-only access to your Dropbox account, allowing you to browse folders, search files, and download content from OpenClaw. It uses OAuth 2.0 authentication with automatic token refresh for seamless long-term access.
Perfect for: Safely accessing your Dropbox files without worrying about accidental modifications or deletions.
This skill is configured for read-only access with the following Dropbox scopes:
files.metadata.read - Read file/folder metadatafiles.content.read - Read file contentaccount_info.read - Read account informationNOT included:
files.content.write - Cannot upload or modify filesfiles.metadata.write - Cannot rename or move filesfiles.permanent_delete - Cannot delete filesThis ensures your Dropbox content remains safe from accidental modifications.
Before using this skill, you need:
dropbox package (auto-installed)Setup time: ~10 minutes
See Setup Guide for step-by-step instructions.
Visit https://www.dropbox.com/developers/apps/create and create a new app:
In your app's settings:
http://localhost:3000/callbackfiles.metadata.readfiles.content.readaccount_info.readCreate credentials.json in the skill directory:
{
"app_key": "your_dropbox_app_key_here",
"app_secret": "your_dropbox_app_secret_here"
}
Important: This file is gitignored and will never be committed.
node setup-oauth.js
This will:
token.jsonnode test-connection.js
If successful, you'll see your Dropbox account information!
# List root folder
node browse.js
# List specific folder
node browse.js "/Documents"
node browse.js "/Photos/2024"
Output:
📁 Listing: /Documents
📄 report.pdf (2.3 MB) - 2024-02-01
📄 presentation.pptx (5.1 MB) - 2024-01-28
📁 Projects
📁 Archive
Total: 4 items
node search-files.js "budget 2024"
node search-files.js "contract"
Output:
🔍 Searching for: "budget 2024"
✅ Found 3 matches:
📄 /Finance/budget-2024-q1.xlsx
Size: 156.3 KB
Modified: 2024-01-15T10:30:00Z
📄 /Reports/budget-2024-summary.pdf
Size: 2.1 MB
Modified: 2024-02-01T14:22:00Z
# Download to local file
node download.js "/Documents/report.pdf" "./downloads/report.pdf"
# Download to current directory
node download.js "/Photos/vacation.jpg" "./vacation.jpg"
Output:
📥 Downloading: /Documents/report.pdf
✅ Saved to: ./downloads/report.pdf (2.3 MB)
From OpenClaw, you can use the exec tool to run these scripts:
Browse files:
Run: node /path/to/dropbox-integration/browse.js "/Documents"
Search for files:
Run: node /path/to/dropbox-integration/search-files.js "contract"
Download a file:
Run: node /path/to/dropbox-integration/download.js "/path/in/dropbox" "./local/path"
Or create custom automation workflows that use the dropbox-helper.js module directly.
token.jsondropbox-helper.jsdropbox-integration/
├── SKILL.md # This file
├── dropbox-helper.js # Auto-refresh Dropbox client
├── setup-oauth.js # OAuth setup script
├── browse.js # Browse folders
├── search-files.js # Search files
├── download.js # Download files
├── test-connection.js # Test authentication
├── credentials.json.example # Template for credentials
├── .gitignore # Excludes credentials.json and token.json
└── references/
└── setup-guide.md # Detailed setup instructions
Create credentials.json with your Dropbox app key and secret (see Quick Start step 3).
Your refresh token may have been revoked. Re-run node setup-oauth.js to re-authenticate.
Check that you enabled the required permissions in your Dropbox App settings under the Permissions tab.
Make sure you added http://localhost:3000/callback to your app's redirect URIs in Dropbox App Console.
If the local server doesn't catch the redirect, manually copy the full URL from your browser after authorization and look for the code= parameter.
credentials.json and token.json are gitignoredFor custom integrations, import the helper directly:
const { getDropboxClient } = require('./dropbox-helper');
async function myCustomFunction() {
const dbx = await getDropboxClient(); // Auto-refreshing client
// Use any Dropbox SDK method
const response = await dbx.filesListFolder({ path: '/Photos' });
console.log(response.result.entries);
}
The helper automatically handles token refresh, so you never need to worry about expiration.
Download multiple files in sequence:
const { getDropboxClient } = require('./dropbox-helper');
const fs = require('fs').promises;
async function downloadMultiple(files) {
const dbx = await getDropboxClient();
for (const file of files) {
const response = await dbx.filesDownload({ path: file.dropboxPath });
await fs.writeFile(file.localPath, response.result.fileBinary);
console.log(`Downloaded: ${file.dropboxPath}`);
}
}
This skill requires the dropbox npm package:
npm install dropbox
The package is automatically installed when you install this skill via ClawHub.
MIT - Free to use, modify, and distribute.
For issues or questions:
Note: This skill is designed for personal use. For production applications with multiple users, consider implementing proper OAuth flow with state management and error handling for concurrent users.