Microsoft OneDrive
The Microsoft OneDrive block manages files and folders in OneDrive from your workflow — upload, download, copy, delete, search, share, and organize content automatically.
File Automation: Save a generated report to the right folder, share it with a view-only link, and hand the link to the next block — all without opening OneDrive.
⚠️
Microsoft OneDrive is not available on the Free plan. Upgrade your workspace plan to use this block.
Key Features
- File Operations: Upload, download, delete, copy, and search files
- Folder Management: Create and delete folders, and list folder contents
- Sharing: Create view, edit, or embed links, scoped to anyone or your organization
- File Metadata: Read a file's name, size, type, and modification dates
- Response Mapping: Save file IDs, URLs, and results into workflow variables
- Variable Support: Use
{{variables}}in file names, content, and queries
Operations
| Operation | What it does | Main fields |
|---|---|---|
| Upload File | Uploads a file from text content or a URL | Parent folder ID, file name, file content or file URL |
| Download File | Downloads a file by ID | File ID |
| Delete File | Deletes a file | File ID |
| Copy File | Copies a file to another folder, optionally renaming it | File ID, destination folder ID, new name |
| Search Files | Searches your OneDrive by query | Query, max results (1–200, default 25) |
| Share File | Creates a sharing link for a file | File ID, share type, share scope |
| Get File Info | Reads a file's metadata | File ID |
| Create Folder | Creates a folder | Folder name, parent folder ID |
| Delete Folder | Deletes a folder | Folder ID |
| List Folder Contents | Lists the items inside a folder | Folder ID |
| Share Folder | Creates a sharing link for a folder | Folder ID, share type, share scope |
Sharing options
| Option | Values | Description |
|---|---|---|
| Share type | view, edit, embed | What the link allows |
| Share scope | anonymous, organization | Anyone with the link, or only people in your organization |
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Microsoft account | Credential | Yes | The connected OneDrive account |
| Action | Select | Yes | One of the operations above |
| Action fields | Varies | Per action | See the operations table — each action shows only its own fields |
| Response mapping | Value → Variable | No | Save response values into workflow variables |
Leave Parent folder ID empty to work in the root of your OneDrive. Get folder and file IDs from List Folder Contents, Search Files, or a previous block's response mapping.
Setting up the credential
- In the block settings, click Continue with Microsoft.
- Sign in with your Microsoft 365 or personal Microsoft account.
- Approve the requested file permissions.
- The credential is created automatically and appears in the dropdown.
Example: weekly report archive
- A Schedule Trigger runs every Friday at 5 PM.
- A Generate Document block produces the weekly report PDF and outputs its URL.
- A OneDrive block with Upload File saves it as
report-{{week}}.pdfinto your Reports folder, mapping File Id to a variable. - A second OneDrive block with Share File (type
view, scopeorganization) creates a link, and a Teams block posts it to the team channel.
Output
Use Response mapping to extract values into variables:
| Value | Description |
|---|---|
File Id / File Name / File Size / Mime Type | The file's identity and metadata |
Web Url | Browser link to the item |
Download Url | Direct download link |
Created Date / Modified Date | Timestamps |
Parent Path | The item's folder path |
Share Link | The sharing URL (Share File / Share Folder) |
Folder Id / Folder Name | Folder identity (folder operations) |
Children / Children Count | Items in a folder (List Folder Contents) |
Search Results | Matching items (Search Files) |
Success | Whether the operation succeeded |
Full Data | The complete raw API response |