Skip to main content
Roberty Studio
RPAOneDrive

List drive items

List drive items

Lists the files and folders at a specific path in OneDrive.


Options​

OneDrive account​

Select the OneDrive Login or Connection action set up in the flow.

Path of the folder to be listed​

Enter the path of the folder from the root of the drive, for example Documents/2024. Leave it empty to list the root of the drive.

Returns​

Javascript code​

js
actions["action-id"].items // the items of the drive (List)

Field selection​

  • items — the items of the drive (List)

Rules and Conditions​

  • The OneDrive account field is required.
  • Only the items directly inside the folder are listed; the content of subfolders is not included.
  • Each item of items has, among others, id, name, type (file or folder), size, webUrl, createdDateTime, lastModifiedDateTime, createdBy, lastModifiedBy and parent. Folders also have folder.childCount and files have file.mimeType.
  • If Microsoft Graph rejects the operation (item not found, insufficient permission, etc.), the action fails with the error message returned by the API.