Tools – Parse CSV

Estimated reading time: 2 min

The tool is designed to process CSV (Comma-Separated Values) content and extract structured data from them. It enables users to map and convert CSV contents into a format that can be further processed in Flows.

In the Parse CSV tool settings, the Data Type can be set to either File or String:

Configuration Table:

The CSV data will be read from a file.

Screenshot of Parse CSV tool screen settings. A red square highlight the Data type field set to File.
Name*Customizable name
Data Type*Specifies the type of input data: File
Use First Row as Header*Determines whether the first row of the CSV file should be treated as a header (column names).
Options:
True → First row is used as headers.
False → Data is processed without headers.
Delimiter*Defines the character used to separate values in the CSV.
Common delimiters:
, (Comma) → Standard CSV format.
\t (Tab) → Used in TSV (Tab-Separated Values).
Others → Define your own delimiter.
Data Type File Configuration
File Name*→ The name of the CSV file being processed.
Extension*→ Expected file extension (e.g., .csv).
Content (base64)* → The file content in Base64 encoding.

In addition, explore the toBase64 and fromBase64 Functions.
Delimiter: The delimiter used to separate values within each row must be consistent throughout the entire CSV string.
Escaping: If any of the values contain special characters like commas or newlines, they might need to be escaped using double quotes (e.g., "value with comma, inside").
Empty Values: If a cell contains no value, you can represent it with an empty string (e.g., Value1,,Value3).

Use Case: Parsing a Customer Orders CSV

A business receives order data in CSV format from an external system and needs to extract it for processing.

Example CSV File Content

OrderID, Customer, Item, Quantity, Price
1001, Alice, Laptop, 1, 1200
1002, Bob, Phone, 2, 800
1003, Charlie, Headphones, 1, 150

Convert the CSV file to Base64 encoding.

Wiresk Configuration for Parse CSV

  • Data Type: File
  • Use First Row as Header: Yes
  • File Name: orders.csv
  • Extension: .csv
  • Content (Base64): Encoded CSV content

Output (Structured Data after Parsing)

[
{
"OrderID": "1001",
"Customer": "Alice",
"Item": "Laptop",
"Quantity": "1",
"Price": "1200"
},
{
"OrderID": "1002",
"Customer": "Bob",
"Item": "Phone",
"Quantity": "2",
"Price": "800"
},
{
"OrderID": "1003",
"Customer": "Charlie",
"Item": "Headphones",
"Quantity": "1",
"Price": "150"
}
]

Configuration Table:

the CSV data will be directly provided as a text string instead of a Base64 encoding file.

Screenshot of Parse CSV tool screen settings. A red square highlight the Data type field set to String.
NameCustomizable name
Data Type*Specifies the type of input data: String
Use First Row as Header*Determines whether the first row of the CSV file should be treated as a header (column names).
Options:
True → First row is used as headers.
False → Data is processed without headers.
Data Type String Configuration
Delimiter*Defines the character used to separate values in the CSV.
Common delimiters:
, (Comma) → Standard CSV format.
\t (Tab) → Used in TSV (Tab-Separated Values).
Others → Define your own delimiter.
CSV*The actual CSV data is provided here as an input string.

Example CSV data type : String

  • Use , comma as delimiter and \n for new lines.
column1,column2,column3\nvalue1-1,value1-2,value1-3\nvalue2-1,value2-2,value2-3

Wiresk Configuration

  • Data Type: String
  • Use First Row as Header: Yes
  • Delimiter: Comma
  • CSV: String to enter

Output (Structured Data after Parsing)

[
{
"column1": "value1-1",
"column2": "value1-2",
"column3": "value1-3"
},
{
"column1": "value2-1",
"column2": "value2-2",
"column3": "value2-3"
}
]

You can also add you CSV string from the Data source input:

  • Go to Wiresk Trigger settings
  • Select Plain Json String
  • Enter your you CSV string as a data field, e.g,

Input Json:

{
"csvString": "column1,column2,column3\nvalue1-1,value1-2,value1-3\nvalue2-1,value2-2,value2-3"
}
Screenshot of Wiresk Flow Builder showing the Trigger add screen. Red arrows show to select Plain Json string option and the example input of Json to create a CSV string.
  • Now, you can use that data to Map your CSV field in Data type : String
Screenshot of Wiresk Flow Builder. It shows the Parse CSV Tool screen setting. It is set to Data type String. Red arrows show where to select to Map the CSV string previously created.