Microsoft OneDrive

App · File Storage · 9 actions

Store, move, and share files with Microsoft OneDrive.

Actions

ActionWhat it does
Create folderCreate a new folder in OneDrive.
Create share linkCreate a sharing link for a file or folder.
Create workbookCreate a new blank Excel workbook (.xlsx) in OneDrive.
Delete file or folderDelete a file or folder from OneDrive.
List drivesList the drives available on a SharePoint site (uses the main site unless you specify one).
List folder contentsList the contents of a folder in OneDrive.
Look up share linkLook up a Microsoft sharing link to get the drive ID and item ID of the shared file or folder.
Move file or folderMove a file or folder to a new location in OneDrive.
Upload fileUpload a file to OneDrive.

Create folder

Create a new folder in OneDrive.

Inputs

Folder namefolder_nametextRequired
Name for the new folder.
Parent item IDparent_item_idtext
ID of the folder to create the new folder inside.
Drive IDdrive_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 a sharing link for a file or folder.

Inputs

Item IDitem_idtextRequired
ID of the file or folder to share.
Link typelink_typetextRequired
Type of link to create (view or edit).
Drive IDdrive_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 nameworkbook_nametextRequired
Name for the new workbook (e.g. 'Q3 Sales'). .xlsx extension added automatically if missing.
Parent item IDparent_item_idtext
ID of the folder to create the workbook in.
Drive IDdrive_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 IDitem_idtextRequired
ID of the file or folder to delete.
Drive IDdrive_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 IDsite_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 IDparent_item_idtext
ID of the folder to list.
Drive IDdrive_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 a Microsoft sharing link to get the drive ID and item ID of the shared file or folder.

Inputs

Share URLshare_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 IDitem_idtextRequired
ID of the file or folder to move.
Destination parent IDdestination_parent_idtextRequired
ID of the folder to move it into.
Drive IDdrive_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 uploadfile_pathtextRequired
The file to upload to OneDrive.
Parent item IDparent_item_idtext
ID of the folder to upload the file into.
Drive IDdrive_idtextRequired
ID of the drive to use. You can find drive IDs with the List drives action.
Conflict behaviorconflict_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://..."
}

On this page