Skip to main content

CSV Component

Build and parse CSV files to and from JavaScript arrays

Component key: csv

Description#

CSV is a delimited text file format that uses a comma to separate values. The CSV component gives you the ability to parse and generate CSV files from JavaScript Arrays. You can also specify a custom delimiter character when building and parsing CSV files.

Actions#

Generate#

Generates a CSV file from an array of rows. | key: generate

InputNotesExample
Input
Delimiter
string
Notes
Provide a string value containing the character the file is delimited on.
Example
,
Input
Data
string
/ Required
Value List
Notes
For each list item, provide a list of strings that represent a row in the file.
Example
{key: "value"}

Parse#

Parses a CSV file into an array of rows. | key: parse

InputNotesExample
Input
CSV File URL
string
/ Required
Notes
Provide a string value that represents the URL location of the CSV file
Example
 
Input
Delimiter
string
Notes
Provide a string value containing the character the file is delimited on.
Example
,

Output Example Payload#

{  "data": {    "data": [],    "errors": [],    "meta": {      "delimiter": ",",      "linebreak": "",      "aborted": false,      "truncated": false,      "cursor": 385    }  }}