DocsWorkflowsComponentsStoragestorage:microsoft:onedrive:write

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

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
idstringAn existing item id whose content to replace; empty writes to path
pathstringThe target file path under the drive root including the file name, used when no id is given
mime_typestringThe content's mime type
contentstringThe file content to write

Outputs

NameTypeDescription
fileFileStorage.File the written item's metadata
  ↳ 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: 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 }}"