The /onedrive
command enables you to manage files and folders in Microsoft OneDrive. Perfect for:
- Listing and searching files
- Downloading documents
- Managing folders
- Sharing files
- Accessing special folders
Basic Usage
Use the command to interact with OneDrive:
/onedrive list files in root folder using connection ID abc123
/onedrive search for "quarterly report" using connection ID abc123
/onedrive download file with ID xyz789 using connection ID abc123
Key Features
File Operations
- List items in folders
- Search across OneDrive
- Download files
- Copy files
- Check file versions
Folder Management
- Navigate folder structure
- Access special folders
- Create new folders
- List folder contents
- Get folder metadata
Sharing & Permissions
- Check file permissions
- Share with specific people
- Invite collaborators
- View shared files
- Manage access rights
- Get file metadata
- View thumbnails
- Check file size
- See modification dates
- Access version history
Example Commands
List Files
/onedrive show all files in root folder with connection abc123
Search Files
/onedrive find all PDF files containing "invoice" with connection abc123
Download File
/onedrive download file ID 01HRDJMGPNAGXLOFE4UR using connection abc123
Access Special Folders
/onedrive show files in Documents folder with connection abc123
Share File
/onedrive share file ID xyz789 with user@example.com using connection abc123
Recent Files
/onedrive show my recently accessed files with connection abc123
Important Notes
Connection ID Required
- Always provide your PinkConnect OneDrive connection ID
- Format: “using connection ID [your-id]”
- Ask user if not provided
File Types
- Files have
.file
property with mimeType
- Folders have
.folder
property
- Check type before downloading
Excel Files
- Downloads as .xlsx format
- Ready to save directly
- CSV conversion requires separate step
Special Folders
Access these built-in folders:
- desktop: Desktop files
- documents: Documents folder
- photos: Pictures folder
- music: Music files
- videos: Video files
File Properties
Common properties returned:
- id: Unique identifier
- name: File/folder name
- size: File size in bytes
- webUrl: Web link to file
- lastModifiedDateTime: Last edit time
Download Handling
When downloading files:
- Check if item is folder first
- Skip folders (can’t download)
- Use file ID for download
- Save with original filename
Sharing Options
Invite People
- Specify email addresses
- Set permission levels
- Require sign-in option
- Send notification emails
Permission Types
- read: View only
- write: Edit access
- owner: Full control
Search Tips
- Use quotes for exact phrases
- Search includes file contents
- Results include metadata
- Filter by file type if needed
Fallback Endpoints
For operations not in standard tools:
- Drive info and quota
- Special folder access
- Permission management
- File sharing/invites
- Thumbnail retrieval
- Version history
- File copying
- Recent files
- Shared with me
- Metadata updates
Tips
- Always include connection ID in commands
- Check item type before operations
- Use search for finding files quickly
- Access special folders for common locations
- Save Excel files before converting to CSV
Responses are generated using AI and may contain mistakes.