Skip to content

Microsoft 365 OneDrive

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.
ParameterTypeRequiredDescription
credentials_idcredentialsYesConfigured Microsoft OAuth account
operationselectYesOperation to perform
ParameterTypeRequiredDescription
folderIdstringNoFolder ID (default: root)
topstringNoMaximum results (default: 50)
outputKeystringNoOutput key (default: files)
ParameterTypeRequiredDescription
fileIdstringYesFile ID to download
outputKeystringNoOutput key (default: fileContent)
ParameterTypeRequiredDescription
fileNamestringYesFile name to create
folderIdstringNoDestination folder (default: root)
contentKeystringNoKey in data with the content (default: fileContent)
ParameterTypeRequiredDescription
querystringYesSearch term (e.g.: .xlsx, report)
topstringNoMaximum results (default: 25)
ParameterTypeRequiredDescription
fileIdstringYesFile ID to delete

Requires Microsoft OAuth2 type credentials with:

  • Scopes: Files.ReadWrite, Files.ReadWrite.All
  • The module manages token refresh automatically
{
"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" }
}
{
"credentials_id": "mi-cuenta-ms365",
"operation": "uploadFile",
"fileName": "informe-mensual.pdf",
"folderId": "root",
"contentKey": "pdfContent"
}
  • 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: rename to avoid errors if it already exists
  • Files are distinguished with isFolder and isFile flags in the output