Zum Inhalt springen
DeutschlandGPT

OneDrive

Search and manage files in Microsoft OneDrive from workflows

Search, download, and manage files in your Microsoft OneDrive directly from workflows.

Authentication: OAuth 2.0. Connect your Microsoft account on the integrations page.

Actions

Search Files

Searches for files in OneDrive.

InputRequiredDescription
QueryYesText to search for in file names and content
OutputTypeDescription
filesarrayFile objects with id, name, size, webUrl, lastModifiedDateTime

List Drives

Returns all drives accessible to the account (personal OneDrive, shared drives).

OutputTypeDescription
drivesarrayDrive objects with id, name, driveType

Download File

Downloads a file from OneDrive as a file other nodes can use. Files up to 100 MB; a folder cannot be downloaded.

InputRequiredDescription
Item IDYesOneDrive file ID
Drive IDNoAnother drive; empty: your own OneDrive
OutputTypeDescription
fileWorkflowFileThe downloaded file
fileNamestringFile name
mimeTypestringMIME type of the file

List Folder

Lists the files and folders in a folder, one page at a time. When hasMore is true, run it again with nextPageToken as Page Token to get the next page.

InputRequiredDescription
Folder IDNoThe folder; empty: the root
Drive IDNoAnother drive; empty: your own OneDrive
Page SizeNoItems per page, default 100, at most 250
Page TokenNonextPageToken of the previous page
FieldsNoOnly these fields per item, e.g. size,lastModifiedDateTime; empty: all fields
Sort byNoname, lastModifiedDateTime or size, ascending or descending
OutputTypeDescription
itemsarrayFiles and folders with id, name, type
hasMorebooleanWhether another page exists
nextPageTokenstringToken for the next page

Get File or Folder Details

Reads the details of one file or folder without downloading it: name, type, size, link, when it was created and last changed and by whom, the folder it is in, and how many items a folder holds.

InputRequiredDescription
Drive IDNoAnother drive; empty: your own OneDrive
Item IDYesThe file or folder

List Sharing and Permissions

Lists who has access to one file or folder and how: sharing links (view or edit; anyone with the link, people in your organization or specific people; expiry and password) and access granted to people or groups directly, each marked when it is inherited from a parent folder. Changes nothing.

OutputTypeDescription
permissionsarrayOne entry per link or grant, with roles, kind, linkScope, grantedTo, inherited

Replace File Content

Overwrites the content of an existing file with another file, up to 25 MB. The file keeps its ID, name, link and sharing; OneDrive keeps the previous content in the version history. To save a new file, use Upload File.

InputRequiredDescription
Drive IDNoAnother drive; empty: your own OneDrive
Item IDYesThe file to overwrite
New contentYesThe file with the new content

Turns a OneDrive or SharePoint link (a sharing link or the address of a file or folder) into the drive ID and item ID the other actions take.

InputRequiredDescription
LinkYesThe link
OutputTypeDescription
driveIdstringDrive of the item
itemIdstringItem ID
typestringfile or folder

Create Folder

Creates a new folder in OneDrive.

InputRequiredDescription
Folder NameYesName for the new folder
Parent Folder IDNoID of the parent folder (defaults to root)
Drive IDNoDrive to create the folder in
OutputTypeDescription
folderIdstringID of the created folder
webUrlstringURL to the folder

Get Folder by Name

Finds a folder by its name.

InputRequiredDescription
Folder NameYesName of the folder to find
Parent Folder IDNoParent folder to search within
OutputTypeDescription
folderobjectFolder metadata
foundbooleanWhether the folder was found
Was this page helpful?