DocsWorkflowsComponentsStoragestorage:google:drive:write

storage:google:drive:write

Writes content into Google Drive under the app's drive.file grant, creating a new file or replacing an existing one, using a connection resolved from the connections store.

Options

NameTypeDescription
connectionstringThe connection id to use; empty resolves the only google-drive connection
idstringAn existing file id whose content to replace; empty creates a new file
namestringThe name of the file to create when no id is given
folderstringThe parent folder id for a new file; empty creates it in the drive root
mime_typestringThe content's mime type (default application/octet-stream)
contentstringThe file content to write

Outputs

NameTypeDescription
fileFileStorage.File the written file'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 Drive
actions:
  - name: summary
    component: storage:local:file:read
    vars:
      path: "{{ var.summary_path }}"

  - name: upload
    component: storage:google:drive:write
    vars:
      name: weekly-summary.md
      mime_type: text/markdown
      content: "{{ summary.content }}"

outputs:
  file_id: "{{ upload.file.id }}"