Lodol Docs

Microsoft OneDrive

API actions for the Microsoft OneDrive integration.

Microsoft OneDrive

Store, move, and share files with Microsoft OneDrive via Microsoft Graph.


Create folder

Create a new folder in OneDrive.

Parameters

ParameterTypeRequiredDescription
folder_namestringYesName for the new folder.
parent_item_idstringNoParent folder item ID.
drive_idstringYesDrive ID for the target drive.

Response

{
  "id": "folder123",
  "name": "NewFolder"
}

Create a sharing link for a file or folder.

Parameters

ParameterTypeRequiredDescription
item_idstringYesItem ID to share.
link_typestringYesType of link to create (view or edit).
drive_idstringYesDrive ID for the target drive.

Response

{
  "link": {
    "webUrl": "https://..."
  }
}

Create workbook

Create a new blank Excel workbook (.xlsx) in OneDrive.

Parameters

ParameterTypeRequiredDescription
workbook_namestringYesName for the new workbook (e.g. 'Q3 Sales'). .xlsx extension added automatically if missing.
parent_item_idstringNoFolder item ID to create the workbook in.
drive_idstringYesDrive ID for the target drive.

Response

{
  "id": "workbook123",
  "name": "Q3 Sales.xlsx",
  "webUrl": "https://..."
}

Delete item

Delete a file or folder from OneDrive.

Parameters

ParameterTypeRequiredDescription
item_idstringYesItem ID to delete.
drive_idstringYesDrive ID for the target drive.

Response

{
  "deleted": true
}

List children

List the contents of a folder in OneDrive.

Parameters

ParameterTypeRequiredDescription
parent_item_idstringNoFolder item ID to list.
drive_idstringYesDrive ID for the target drive.

Response

{
  "value": [
    {
      "id": "item1",
      "name": "file1.txt"
    }
  ]
}

List drives

List available drives on a SharePoint site (defaults to root site).

Parameters

ParameterTypeRequiredDescription
site_idstringNoSharePoint site ID (defaults to 'root' for the root site).

Response

{
  "value": [
    {
      "driveType": "documentLibrary",
      "id": "drive1",
      "name": "Documents"
    }
  ]
}

Move item

Move a file or folder to a new location in OneDrive.

Parameters

ParameterTypeRequiredDescription
item_idstringYesItem ID of the file or folder to move.
destination_parent_idstringYesDestination folder item ID.
drive_idstringYesDrive ID for the target drive.

Response

{
  "id": "item123",
  "name": "movedItem"
}

Resolve a Microsoft sharing URL to get the drive ID and item ID for the shared file or folder.

Parameters

ParameterTypeRequiredDescription
share_urlstringYesMicrosoft sharing URL (e.g., from SharePoint or OneDrive).

Response

{
  "drive_id": "drive456",
  "item_id": "item123",
  "name": "Project Tracker.xlsx",
  "web_url": "https://..."
}

Upload file

Upload a file to OneDrive.

Parameters

ParameterTypeRequiredDescription
file_pathstringYesUploaded file reference for the file to upload.
parent_item_idstringNoFolder item ID to upload into.
drive_idstringYesDrive ID for the target drive.
conflict_behaviorstringNoHow to handle filename conflicts (rename, replace, or fail).

Response

{
  "id": "item123",
  "name": "file.txt",
  "webUrl": "https://..."
}

On this page