DocsWorkflowsComponentsStoragestorage:microsoft:onedrive:read

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

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
idstringThe item id to read, as returned by storage:microsoft:onedrive:list
pathstringThe file path under the drive root, used when no id is given

Outputs

NameTypeDescription
fileFileStorage.File the 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
contentstringThe file contents as a UTF-8 string
body[]byteThe 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 }}"