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
| Name | Type | Description |
|---|---|---|
connection | string | The connection id to use; empty resolves the only google-drive connection |
id | string | An existing file id whose content to replace; empty creates a new file |
name | string | The name of the file to create when no id is given |
folder | string | The parent folder id for a new file; empty creates it in the drive root |
mime_type | string | The content's mime type (default application/octet-stream) |
content | string | The file content to write |
Outputs
| Name | Type | Description |
|---|---|---|
file | File | Storage.File the written file'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 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 }}"