DocsWorkflowsComponentsStoragestorage:microsoft:onedrive:list

storage:microsoft:onedrive:list

Lists the children of a OneDrive or SharePoint folder over Microsoft Graph, using a connection resolved from the connections store.

Options

NameTypeDescription
connectionstringThe connection id to use; empty resolves the only microsoft-onedrive connection
drivestringA drive id for a SharePoint document library or another drive; empty uses the signed-in user's OneDrive
pathstringThe folder path under the drive root to list; empty lists the root
limitintHow many items to return (default 100)

Outputs

NameTypeDescription
countintHow many items were returned
files[]FileThe folder's children
  ↳ idstringThe provider's file id
  ↳ namestringThe file name
  ↳ mime_typestringThe file's mime type
  ↳ sizeint64The file size in bytes
  ↳ modifiedstringThe last modification time in RFC 3339
  ↳ folderboolWhether the entry is a folder

Example

name: List a SharePoint folder
actions:
  - name: reports
    component: storage:microsoft:onedrive:list
    vars:
      drive: "{{ var.drive_id }}"
      path: Shared Documents/Reports
      limit: 20

outputs:
  count: "{{ reports.count }}"
  files: "{{ reports.files }}"