Documentation Index
Fetch the complete documentation index at: https://crewai-devin-1778040886-fix-hitl-pre-review-silent-fallback.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Enable your agents to upload, download, and manage files and folders in Microsoft OneDrive. Automate file operations, organize content, create sharing links, and streamline your cloud storage workflows with AI-powered automation.Prerequisites
Before using the Microsoft OneDrive integration, ensure you have:- A CrewAI AMP account with an active subscription
- A Microsoft account with OneDrive access
- Connected your Microsoft account through the Integrations page
Setting Up Microsoft OneDrive Integration
1. Connect Your Microsoft Account
- Navigate to CrewAI AMP Integrations
- Find Microsoft OneDrive in the Authentication Integrations section
- Click Connect and complete the OAuth flow
- Grant the necessary permissions for file access
- Copy your Enterprise Token from Integration Settings
2. Install Required Package
3. Environment Variable Setup
Agent(apps=[]), you must set the
CREWAI_PLATFORM_INTEGRATION_TOKEN environment variable with your Enterprise
Token..env file:
Available Actions
microsoft_onedrive/list_files
microsoft_onedrive/list_files
top(integer, optional): Number of items to retrieve (max 1000). Default is50.orderby(string, optional): Order by field (e.g., “name asc”, “lastModifiedDateTime desc”). Default is “name asc”.filter(string, optional): OData filter expression.
microsoft_onedrive/get_file_info
microsoft_onedrive/get_file_info
item_id(string, required): The ID of the file or folder.
microsoft_onedrive/download_file
microsoft_onedrive/download_file
item_id(string, required): The ID of the file to download.
microsoft_onedrive/upload_file
microsoft_onedrive/upload_file
file_name(string, required): Name of the file to upload.content(string, required): Base64 encoded file content.
microsoft_onedrive/create_folder
microsoft_onedrive/create_folder
folder_name(string, required): Name of the folder to create.
microsoft_onedrive/delete_item
microsoft_onedrive/delete_item
item_id(string, required): The ID of the file or folder to delete.
microsoft_onedrive/copy_item
microsoft_onedrive/copy_item
item_id(string, required): The ID of the file or folder to copy.parent_id(string, optional): The ID of the destination folder (optional, defaults to root).new_name(string, optional): New name for the copied item (optional).
microsoft_onedrive/move_item
microsoft_onedrive/move_item
item_id(string, required): The ID of the file or folder to move.parent_id(string, required): The ID of the destination folder.new_name(string, optional): New name for the item (optional).
microsoft_onedrive/search_files
microsoft_onedrive/search_files
query(string, required): Search query string.top(integer, optional): Number of results to return (max 1000). Default is50.
microsoft_onedrive/share_item
microsoft_onedrive/share_item
microsoft_onedrive/get_thumbnails
microsoft_onedrive/get_thumbnails
item_id(string, required): The ID of the file.
microsoft_onedrive/list_files_by_path
microsoft_onedrive/list_files_by_path
folder_path(string, required): The folder path (e.g., ‘Documents/Reports’).top(integer, optional): Number of items to retrieve (max 1000). Default is50.orderby(string, optional): Order by field (e.g., “name asc”, “lastModifiedDateTime desc”). Default is “name asc”.
microsoft_onedrive/get_recent_files
microsoft_onedrive/get_recent_files
top(integer, optional): Number of items to retrieve (max 200). Default is25.
microsoft_onedrive/get_shared_with_me
microsoft_onedrive/get_shared_with_me
microsoft_onedrive/get_file_by_path
microsoft_onedrive/get_file_by_path
file_path(string, required): The file or folder path (e.g., ‘Documents/report.docx’).
microsoft_onedrive/download_file_by_path
microsoft_onedrive/download_file_by_path
file_path(string, required): The file path (e.g., ‘Documents/report.docx’).
Usage Examples
Basic Microsoft OneDrive Agent Setup
File Upload and Management
File Organization and Sharing
Troubleshooting
Common Issues
Authentication Errors- Ensure your Microsoft account has the necessary permissions for file access (e.g.,
Files.Read,Files.ReadWrite). - Verify that the OAuth connection includes all required scopes.
- Ensure
file_nameandcontentare provided for file uploads. - Content must be Base64 encoded for binary files.
- Check that you have write permissions to OneDrive.
- Double-check item IDs for correctness when accessing specific files or folders.
- Item IDs are returned by other operations like
list_filesorsearch_files. - Ensure the referenced items exist and are accessible.
- Use appropriate search terms for
search_filesoperations. - For
filterparameters, use proper OData syntax.
- For
move_item, ensure bothitem_idandparent_idare provided. - For
copy_item, onlyitem_idis required;parent_iddefaults to root if not specified. - Verify that destination folders exist and are accessible.
- Ensure the item exists before creating sharing links.
- Choose appropriate
typeandscopebased on your sharing requirements. anonymousscope allows access without sign-in;organizationrequires organizational account.
