Microsoft OneDrive
App · File Storage · 9 actions
Store, move, and share files with Microsoft OneDrive.
Actions
| Action | What it does |
|---|---|
| Create folder | Create a new folder in OneDrive. |
| Create share link | Create a sharing link for a file or folder. |
| Create workbook | Create a new blank Excel workbook (.xlsx) in OneDrive. |
| Delete file or folder | Delete a file or folder from OneDrive. |
| List drives | List the drives available on a SharePoint site (uses the main site unless you specify one). |
| List folder contents | List the contents of a folder in OneDrive. |
| Look up share link | Look up a Microsoft sharing link to get the drive ID and item ID of the shared file or folder. |
| Move file or folder | Move a file or folder to a new location in OneDrive. |
| Upload file | Upload a file to OneDrive. |
Create folder
Create a new folder in OneDrive.
Inputs
- Folder name
folder_nametextRequired - Name for the new folder.
- Parent item ID
parent_item_idtext - ID of the folder to create the new folder inside.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
idtext- Created folder item ID. Use as parent_item_id, destination_parent_id, or item_id in other OneDrive actions.
nametext- Folder name.
Example output
{
"id": "folder123",
"name": "NewFolder"
}Create share link
Create a sharing link for a file or folder.
Inputs
- Item ID
item_idtextRequired - ID of the file or folder to share.
- Link type
link_typetextRequired - Type of link to create (view or edit).
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
linkobject
Example output
{
"link": {
"webUrl": "https://..."
}
}Create workbook
Create a new blank Excel workbook (.xlsx) in OneDrive.
Inputs
- Workbook name
workbook_nametextRequired - Name for the new workbook (e.g. 'Q3 Sales'). .xlsx extension added automatically if missing.
- Parent item ID
parent_item_idtext - ID of the folder to create the workbook in.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
idtext- Created workbook item ID. Use as item_id in Microsoft Excel actions.
nametext- Workbook filename.
webUrltext- Web URL to open the workbook.
Example output
{
"id": "workbook123",
"name": "Q3 Sales.xlsx",
"webUrl": "https://..."
}Delete file or folder
Delete a file or folder from OneDrive.
Inputs
- Item ID
item_idtextRequired - ID of the file or folder to delete.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
deletedtrue/false- Whether deletion succeeded.
Example output
{
"deleted": true
}List drives
List the drives available on a SharePoint site (uses the main site unless you specify one).
Inputs
- Site ID
site_idtext - SharePoint site ID. Leave blank to use the main site (defaults to 'root').
Outputs
valuelist- List of drives.
Example output
{
"value": [
{
"driveType": "documentLibrary",
"id": "drive1",
"name": "Documents"
}
]
}List folder contents
List the contents of a folder in OneDrive.
Inputs
- Parent item ID
parent_item_idtext - ID of the folder to list.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
valuelist- List of files and folders.
Example output
{
"value": [
{
"id": "item1",
"name": "file1.txt"
}
]
}Look up share link
Look up a Microsoft sharing link to get the drive ID and item ID of the shared file or folder.
Inputs
- Share URL
share_urltextRequired - Microsoft sharing URL (e.g., from SharePoint or OneDrive).
Outputs
drive_idtext- Drive ID. Use as drive_id in Microsoft Excel actions or other OneDrive actions.
item_idtext- Item ID. Use as item_id in Microsoft Excel actions or other OneDrive actions.
nametext- File or folder name.
web_urltext- Web URL for the item.
Example output
{
"drive_id": "drive456",
"item_id": "item123",
"name": "Project Tracker.xlsx",
"web_url": "https://..."
}Move file or folder
Move a file or folder to a new location in OneDrive.
Inputs
- Item ID
item_idtextRequired - ID of the file or folder to move.
- Destination parent ID
destination_parent_idtextRequired - ID of the folder to move it into.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
Outputs
idtext- Moved item ID. Use as item_id in delete_item or create_share_link.
nametext- Item name.
Example output
{
"id": "item123",
"name": "movedItem"
}Upload file
Upload a file to OneDrive.
Inputs
- File to upload
file_pathtextRequired - The file to upload to OneDrive.
- Parent item ID
parent_item_idtext - ID of the folder to upload the file into.
- Drive ID
drive_idtextRequired - ID of the drive to use. You can find drive IDs with the List drives action.
- Conflict behavior
conflict_behaviortext - What to do if a file with the same name already exists: rename, replace, or fail.
Outputs
idtext- Uploaded file item ID. Use as item_id in move_item, delete_item, or create_share_link.
nametext- File name.
webUrltext- Web URL for the uploaded file.
Example output
{
"id": "item123",
"name": "file.txt",
"webUrl": "https://..."
}