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
| Name | Type | Description |
|---|---|---|
connection | string | The connection id to use; empty resolves the only microsoft-onedrive connection |
drive | string | A drive id for a SharePoint document library or another drive; empty uses the signed-in user's OneDrive |
path | string | The folder path under the drive root to list; empty lists the root |
limit | int | How many items to return (default 100) |
Outputs
| Name | Type | Description |
|---|---|---|
count | int | How many items were returned |
files | []File | The folder's children |
↳ id | string | The provider's file id |
↳ name | string | The file name |
↳ mime_type | string | The file's mime type |
↳ size | int64 | The file size in bytes |
↳ modified | string | The last modification time in RFC 3339 |
↳ folder | bool | Whether 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 }}"