Microsoft 365 OneDrive
Description
Section titled “Description”This module integrates Microsoft OneDrive via Microsoft Graph API. Available operations:
- List files: Lists files and folders from a specific location or root. Returns metadata including MIME type, size and URLs.
- Search files: Searches files by name or extension across all of OneDrive.
- Download file: Downloads file content. Returns it Base64 encoded along with metadata (name, size, MIME type).
- Upload file: Uploads content (Base64 or text) to a specific location. Supports configurable destination folder.
- Create folder: Creates a new folder with conflict detection (automatically renames if it already exists).
- Delete file/folder: Deletes an item by ID.
- Get info: Gets detailed metadata of a file or folder including path and parent folder.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Configured Microsoft OAuth account |
| operation | select | Yes | Operation to perform |
Sub-node List Files
Section titled “Sub-node List Files”| Parameter | Type | Required | Description |
|---|---|---|---|
| folderId | string | No | Folder ID (default: root) |
| top | string | No | Maximum results (default: 50) |
| outputKey | string | No | Output key (default: files) |
Sub-node Download File
Section titled “Sub-node Download File”| Parameter | Type | Required | Description |
|---|---|---|---|
| fileId | string | Yes | File ID to download |
| outputKey | string | No | Output key (default: fileContent) |
Sub-node Upload File
Section titled “Sub-node Upload File”| Parameter | Type | Required | Description |
|---|---|---|---|
| fileName | string | Yes | File name to create |
| folderId | string | No | Destination folder (default: root) |
| contentKey | string | No | Key in data with the content (default: fileContent) |
Sub-node Search Files
Section titled “Sub-node Search Files”| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search term (e.g.: .xlsx, report) |
| top | string | No | Maximum results (default: 25) |
Sub-node Delete File
Section titled “Sub-node Delete File”| Parameter | Type | Required | Description |
|---|---|---|---|
| fileId | string | Yes | File ID to delete |
Credentials
Section titled “Credentials”Requires Microsoft OAuth2 type credentials with:
- Scopes: Files.ReadWrite, Files.ReadWrite.All
- The module manages token refresh automatically
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "files": [ { "id": "abc123", "name": "reporte.xlsx", "size": 45678, "createdTime": "2026-01-01T00:00:00Z", "modifiedTime": "2026-03-20T10:00:00Z", "webUrl": "https://onedrive.live.com/...", "isFolder": false, "isFile": true, "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "childCount": 0 } ] }, "_meta_": { "operation": "listFiles", "microsoftService": "onedrive" }}Usage Example
Section titled “Usage Example”Basic case - Upload file
Section titled “Basic case - Upload file”{ "credentials_id": "mi-cuenta-ms365", "operation": "uploadFile", "fileName": "informe-mensual.pdf", "folderId": "root", "contentKey": "pdfContent"}API Used
Section titled “API Used”- Microsoft Graph API - OneDrive endpoints (
/me/drive/root/children,/me/drive/items/{id})
- Downloaded content is returned in Base64 for easier subsequent processing
- When uploading, the content is attempted to be decoded from Base64; if it fails, it is treated as UTF-8
- Folder creation uses
conflictBehavior: renameto avoid errors if it already exists - Files are distinguished with
isFolderandisFileflags in the output
Related Nodes
Section titled “Related Nodes”- MS365 Excel - Excel files in OneDrive
- MS365 Outlook - Email with Outlook
- MS365 Calendar - Microsoft 365 Calendar