Skip to content

SFTP Stream Write

Write data items to a file on an SFTP server in a structured format. Supports CSV, JSON, JSON Lines, XML, and TSV output with optional GZIP compression.

Requires an SFTP connection.

Configuration

FieldDescriptionNotes
SFTP ConnectionThe SFTP connection to useRequired. Select from your configured SFTP connections.
Target DirectoryThe remote directory to write toSupports templates. A directory browser is provided.
Filename TemplateThe name of the output fileRequired. Supports templates, so you can include dynamic values like dates. Example: export_2026-03-16.csv
Output FormatThe format to write data inRequired. See table below. Defaults to CSV.
Write ModeHow to handle existing filesSee table below. Defaults to Append.
Format Options (JSON)A JSON object with format-specific settingsSupported key: pretty_print (boolean) -- format JSON/XML output with indentation. Defaults to {"pretty_print": false}.
CSV Column OrderComma-separated list of column names to control selection and orderOnly shown for CSV and TSV formats. Leave empty to use alphabetical order. Example: name,email,created_at
Compress File (GZIP)Compress the output file with GZIPDisabled by default. When enabled, .gz is appended to the filename if not already present.
Create DirectoriesAutomatically create parent directories if they do not existEnabled by default.

Output Formats

FormatDescription
CSVComma-separated values with a header row. Metadata fields (prefixed with _) are excluded.
JSONA JSON array containing all items.
JSON LinesOne JSON object per line -- useful for large datasets and streaming.
XMLXML document with <items> root element and <item> child elements.
TSVTab-separated values with a header row.

Write Modes

ModeBehavior
AppendAdd data to the end of an existing file, or create a new file if it does not exist
OverwriteReplace the file contents entirely
Fail If ExistsFail with an error if the file already exists
Unique NameAutomatically append a UTC timestamp to the filename (e.g., export_20260316_143005.csv) to avoid conflicts

Input

The node requires a data input. All items received from upstream nodes are collected, formatted, and written to the specified file.

Output

After writing, the node outputs a single item with the following fields:

FieldDescription
successtrue if the write completed successfully
fileThe full remote path of the written file
filenameThe filename portion
bytes_writtenNumber of bytes written to the server
items_writtenNumber of data items written
formatThe output format used
compressedWhether GZIP compression was applied

If no data items are received, the node outputs items_written: 0 with a message of no data to write and does not create a file.

TIP

Use the CSV Column Order field to control exactly which columns appear in CSV/TSV output and in what order. This is especially useful when downstream systems expect a specific column layout.

TIP

The Unique Name write mode is ideal for recurring workflows that should produce a new file each run without overwriting previous output.

WARNING

When using Append mode with CSV or TSV format, headers are written with the first append. Subsequent appends add data rows only if the file already contains a header. Be mindful of column consistency across appends.