storage:microsoft:onedrive:read
Downloads one OneDrive or SharePoint file's metadata and content 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 |
id | string | The item id to read, as returned by storage:microsoft:onedrive:list |
path | string | The file path under the drive root, used when no id is given |
Outputs
| Name | Type | Description |
|---|---|---|
file | File | Storage.File the item's metadata |
↳ 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 |
content | string | The file contents as a UTF-8 string |
body | []byte | The file contents as raw bytes |
Example
name: Read a OneDrive file by path
actions:
- name: budget
component: storage:microsoft:onedrive:read
vars:
path: Finance/budget.csv
outputs:
name: "{{ budget.file.name }}"
content: "{{ budget.content }}"