Skip to content

Load CSV

The Load CSV node downloads a CSV file from a provided path, converts it to JSON, and stores the parsed object in the workflow data for further processing.

Purpose

Use this node to:

✅ Download CSV files and convert them to JSON for data-driven workflows.
✅ Load tabular data as structured dictionaries for looping, processing, or external system integrations.
✅ Integrate external data sources provided in CSV format into automation tasks.

Inputs

Field LabelInput TypeDescription
Csv FileTextThe path or URL to the CSV file to load and convert to JSON.

Outputs

Output VariableDescription
[BaseName]Stores the parsed CSV data as a list of dictionaries, keyed by the file’s base name (filename without extension).

Functionality

This node:

  1. Validates required input (Csv File).
  2. Downloads the CSV file to the workflow working folder.
  3. Parses the CSV file:
    • Reads all lines.
    • Uses the first line as headers.
    • Parses subsequent rows into dictionaries mapping header names to values.
  4. Converts the parsed data to JSON and deserialises it back to an object for storage.
  5. Stores the resulting object in the workflow data under the key matching the CSV file’s base name.
  6. Returns task success status and a completed message upon successful execution.

Example Use Case

✅ Load a list of users from a CSV file for creation in an external system.
✅ Process a product catalogue or pricing table for ERP integration.
✅ Dynamically create tasks or records in a loop from CSV-sourced data.

Task Success Criteria

  • Success: CSV is downloaded, parsed, converted to JSON, and stored in the workflow data successfully.
  • Failure: If input validation fails, download fails, or parsing encounters errors, the task returns a descriptive error message indicating the failure point.

Notes

  • The output variable key is derived from the file’s base name (e.g. employees.csv produces output key employees).
  • CSV headers are used as JSON keys; ensure the first line of your CSV is a valid header row.
  • Empty cells are returned as null in the resulting dictionaries.

Tentech 2024