storage:microsoft:onedrive:write
Writes content into a OneDrive or SharePoint drive over Microsoft Graph, creating or replacing the target file, 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 | An existing item id whose content to replace; empty writes to path |
path | string | The target file path under the drive root including the file name, used when no id is given |
mime_type | string | The content's mime type |
content | string | The file content to write |
Outputs
| Name | Type | Description |
|---|---|---|
file | File | Storage.File the written 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 |
Example
name: Write workflow output into OneDrive
actions:
- name: summary
component: storage:local:file:read
vars:
path: "{{ var.summary_path }}"
- name: upload
component: storage:microsoft:onedrive:write
vars:
path: Reports/weekly-summary.md
mime_type: text/markdown
content: "{{ summary.content }}"
outputs:
file_id: "{{ upload.file.id }}"