Skip to content

CSV Parse

This module reads a CSV file from the file system and converts it into an array of JSON objects. It supports custom configuration of column and row separators, file encoding and using the first row as header. It also automatically detects and parses JSON content embedded within CSV cells. It is ideal for importing data from CSV files generated by other systems, spreadsheets or database exports.

ParameterTypeRequiredDescription
filePathstringYesFull path to the CSV file to read. Supports dynamic variables {{variable}}.
col_separatorstringNoColumn separator. Default ,.
row_separatorstringNoRow separator. Values: line break (default), or any custom character.
codificationstringNoFile encoding. Default utf8.
header_first_rowbooleanNoIf true, uses the first row as column names. Default false.
col_headerstringNoCustom column titles.
dataKeystringNoIf specified, the result is wrapped in an object with this key.
{
"nextModule": "siguiente_modulo",
"data": [
{ "nombre": "Juan", "edad": "30", "ciudad": "Madrid" },
{ "nombre": "Ana", "edad": "25", "ciudad": "Barcelona" }
],
"_meta_": {
"filename": "/ruta/al/archivo.csv",
"rows": 2
}
}
{
"filePath": "/data/clientes.csv",
"col_separator": ",",
"header_first_row": true,
"codification": "utf8"
}
  • Supports dynamic variables {{variable}} in the filePath parameter
  • If header_first_row is false, columns are named as col_1, col_2, etc.
  • Automatically detects and parses JSON objects embedded within cells
  • Double quotes and carriage returns are automatically cleaned
  • Empty lines are ignored during processing
  • csvcreate (inverse operation: JSON to CSV)
  • dataTransform (transform data after import)
  • dataMapping (map imported CSV fields)