Skip to main content

Write CSV

Controlled node

Overview

The Write CSV node saves tabular data as a .csv file in the project library. It accepts either an existing CSV string or structured data that can be converted to CSV, such as a list of dictionaries or arrays.

This node is useful for exporting database results, dataframe outputs, extracted tables, or workflow-generated records for use in spreadsheet tools and downstream systems.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the CSV file creation and upload.-
DataDataThe CSV content to save. Can be a CSV string or data that can be converted to CSV.-
NameDataThe filename for the generated CSV file. If the name does not end with .csv, the extension is appended automatically.-
PathDataOptional folder path in the library where the CSV file should be saved. Missing folders are created automatically. If omitted, the file is saved in the root library folder.root

Outputs

OutputTypeDescription
DoneEventFires when the node has finished running.
FileDataThe generated library file reference. If conversion or upload fails, this output contains an error object.

Runtime Behavior and Defaults

  • Controlled Node: The node runs only when the Run event fires.
  • Project Requirement: A runtime project ID is required so the CSV file can be uploaded to the project library.
  • Filename Handling: The node requires a non-empty Name input. .csv is appended if the extension is missing.
  • Directory Creation: If Path is provided, the node creates or resolves that library folder path before uploading.
  • CSV String Validation: If Data is already a string, the node parses it as CSV before upload. Invalid CSV strings return an error.
  • Structured Data Conversion: If Data is not a string, the node converts it to CSV using Papa Parse.
  • Error Handling: If data, project ID, filename, CSV conversion, or upload fails, File contains an error object instead of a file reference.

Example Usage

Export Query Results

  1. Connect a list of records from Query DB or another data-producing node to Data.
  2. Set Name to "query-results".
  3. Optionally set Path to "exports/csv".
  4. Trigger Run from a Start node or another event.

The node saves query-results.csv to the library and outputs the generated file reference.

Save an Existing CSV String

If Data is already CSV text, the node validates that it can be parsed and then uploads it as-is.

tip

Use Read CSV later in another workflow to load the saved CSV file back into structured data.