Skip to content

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

FieldDescriptionNotes
Google Drive ConnectionThe connection to useRequired
File NameThe name for the uploaded fileRequired. Supports templates.
Destination FolderFolder to upload intoBrowse to pick. Leave empty for "My Drive" root.
SourceWhere the file body comes fromFrom upstream data (default) or Custom content
FormatHow input items are serializedVisible when Source = data. CSV, TSV, JSON (default), JSON Lines, XML, or Raw
CSV Column OrderComma-separated columns for CSV/TSVVisible when Format ∈ {csv, tsv}. Leave empty for union of keys
File ContentLiteral body to uploadVisible 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 Order when 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

FieldDescription
file_nameThe uploaded file name
folder_idThe destination folder (empty for My Drive root)
sourceThe Source mode (data or content)
formatPresent when Source = data; the Format that was used
content_typeThe MIME type that was set on the file
itemsNumber of items serialized (0 in content mode)
id, name, mimeType, size, modifiedTime, parents, webViewLinkFrom Drive's response — use {{ uploadNode.id }} etc. downstream

Common Pattern: DataStore → Google Drive as CSV

  1. DataStore Query — fetch the rows
  2. Google Drive WriteFile 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.