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
| Field | Description | Notes |
|---|---|---|
| SFTP Connection | The SFTP connection to use | Required. Select from your configured SFTP connections. |
| Target Directory | The remote directory to write to | Supports templates. A directory browser is provided. |
| Filename Template | The name of the output file | Required. Supports templates, so you can include dynamic values like dates. Example: export_2026-03-16.csv |
| Output Format | The format to write data in | Required. See table below. Defaults to CSV. |
| Write Mode | How to handle existing files | See table below. Defaults to Append. |
| Format Options (JSON) | A JSON object with format-specific settings | Supported key: pretty_print (boolean) -- format JSON/XML output with indentation. Defaults to {"pretty_print": false}. |
| CSV Column Order | Comma-separated list of column names to control selection and order | Only 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 GZIP | Disabled by default. When enabled, .gz is appended to the filename if not already present. |
| Create Directories | Automatically create parent directories if they do not exist | Enabled by default. |
Output Formats
| Format | Description |
|---|---|
| CSV | Comma-separated values with a header row. Metadata fields (prefixed with _) are excluded. |
| JSON | A JSON array containing all items. |
| JSON Lines | One JSON object per line -- useful for large datasets and streaming. |
| XML | XML document with <items> root element and <item> child elements. |
| TSV | Tab-separated values with a header row. |
Write Modes
| Mode | Behavior |
|---|---|
| Append | Add data to the end of an existing file, or create a new file if it does not exist |
| Overwrite | Replace the file contents entirely |
| Fail If Exists | Fail with an error if the file already exists |
| Unique Name | Automatically 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:
| Field | Description |
|---|---|
success | true if the write completed successfully |
file | The full remote path of the written file |
filename | The filename portion |
bytes_written | Number of bytes written to the server |
items_written | Number of data items written |
format | The output format used |
compressed | Whether 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.