Skip to main content
Roberty Studio
RPASharePoint

List drive items

List drive items

Lists the files and folders in a specific folder of a SharePoint drive.


Options​

SharePoint drive​

Select the action that gets the SharePoint drive: Get a drive from the list or Get drive by name.

Folder of the path 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 SharePoint drive 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.