Google Drive Write
Write a single file to Google Drive from either upstream items or a literal content string. Google Drive Write is a content-creating sink: it produces the file body and uploads it. (For moving an existing file between folders, use Google Drive Copy or Move instead.)
Requires a Google Drive connection.
Configuration
| Field | Description | Notes |
|---|---|---|
| Google Drive Connection | The connection to use | Required |
| File Name | The name for the uploaded file | Required. Supports templates. |
| Destination Folder | Folder to upload into | Browse to pick. Leave empty for "My Drive" root. |
| Source | Where the file body comes from | From upstream data (default) or Custom content |
| Format | How input items are serialized | Visible when Source = data. CSV, TSV, JSON (default), JSON Lines, XML, or Raw |
| CSV Column Order | Comma-separated columns for CSV/TSV | Visible when Format ∈ {csv, tsv}. Leave empty for union of keys |
| File Content | Literal body to upload | Visible when Source = content. Supports templates |
The Drive file's MIME type is set automatically: from Format when Source = data (e.g. csv → text/csv, jsonl → application/x-ndjson), or application/octet-stream when Source = content.
Source modes
- From upstream data — serialize every input item into the file using the chosen Format. Use this when you have rows/records from a database query, API response, etc.
- Custom content — write the File Content field verbatim. Use this when you've already composed the bytes yourself (perhaps via templates referencing upstream items) and don't want the engine to serialize anything.
Format choices (Source = data)
- JSON — single JSON array containing every input item. Buffered in memory.
- JSON Lines — one JSON object per line. Streams without buffering.
- CSV / TSV — header is
CSV Column Orderwhen set, otherwise the union of keys across all items (sorted alphabetically). Underscore-prefixed metadata fields are skipped. Missing / null cells render empty. - XML —
<items><item>…</item></items>envelope, one element per item. - Raw — pass-through. Each item must already be a string or
[]byte; anything else is rejected.
Output
| Field | Description |
|---|---|
file_name | The uploaded file name |
folder_id | The destination folder (empty for My Drive root) |
source | The Source mode (data or content) |
format | Present when Source = data; the Format that was used |
content_type | The MIME type that was set on the file |
items | Number of items serialized (0 in content mode) |
id, name, mimeType, size, modifiedTime, parents, webViewLink | From Drive's response — use {{ uploadNode.id }} etc. downstream |
Common Pattern: DataStore → Google Drive as CSV
- DataStore Query — fetch the rows
- Google Drive Write —
File Name: tasks.csv,Source: From upstream data,Format: CSV
One CSV file lands in Drive with one header row + one row per record. For very large tables, prefer Format: JSON Lines — it streams item-by-item.
Streaming
When connected to a streaming upstream node, items are written to one file (not one file per item). If you need per-item file fan-out, do the loop explicitly with a Switch / sub-workflow.