Mandala
Tools

OneDrive

Create, upload, download, list, and delete files

Usage Instructions

Integrate OneDrive into the workflow. Can create text and Excel files, upload files, download files, list files, and delete files or folders.

Tools

onedrive_upload

Upload a file to OneDrive

Input

ParameterTypeRequiredDescription
fileNamestringYesThe name of the file to upload
filefileNoThe file to upload (binary)
contentstringNoThe text content to upload (if no file is provided)
mimeTypestringNoThe MIME type of the file to create (e.g., text/plain for .txt, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for .xlsx)
folderSelectorstringNoSelect the folder to upload the file to

Output

ParameterTypeDescription
successbooleanWhether the file was uploaded successfully
fileobjectThe uploaded file object with metadata including id, name, webViewLink, webContentLink, and timestamps

onedrive_create_folder

Create a new folder in OneDrive

Input

ParameterTypeRequiredDescription
folderNamestringYesName of the folder to create
folderSelectorstringNoSelect the parent folder to create the folder in

Output

ParameterTypeDescription
successbooleanWhether the folder was created successfully
fileobjectThe created folder object with metadata including id, name, webViewLink, and timestamps

onedrive_download

Download a file from OneDrive

Input

ParameterTypeRequiredDescription
fileIdstringYesThe ID of the file to download
fileNamestringNoOptional filename override

Output

ParameterTypeDescription
filefileDownloaded file stored in execution files

onedrive_list

List files and folders in OneDrive

Input

ParameterTypeRequiredDescription
folderSelectorstringNoSelect the folder to list files from
querystringNoA query to filter the files
pageSizenumberNoThe number of files to return

Output

ParameterTypeDescription
successbooleanWhether files were listed successfully
filesarrayArray of file and folder objects with metadata
nextPageTokenstringToken for retrieving the next page of results (optional)

onedrive_delete

Delete a file or folder from OneDrive

Input

ParameterTypeRequiredDescription
fileIdstringYesThe ID of the file or folder to delete

Output

ParameterTypeDescription
successbooleanWhether the file was deleted successfully
deletedbooleanConfirmation that the file was deleted
fileIdstringThe ID of the deleted file

Notes

  • Category: tools
  • Type: onedrive
OneDrive