CSV Module
Last updated
Last updated
The "CSV" tool module, standard module for use in any flow, was created for converting data from the "CSV" file format to JSON and vice versa.
The "CSV" module consists of two operations, "Convert CSV to JSON" and "Convert JSON to CSV".
The "CSV" module appears in the Tools option when editing a flow. When added to a flow, it offers two operations:
Convert CSV to JSON: converts a spreadsheet in CSV to JSON format.
Convert JSON to CSV: converts a spreadsheet in JSON to CSV format
This operation allows you to convert a CSV table with different items (products, customers, etc.) to JSON format, so that this information can be used later in the flow.
To use this option, choose "Convert CSV to JSON" and then click "Save".
If you click to edit the module, the following area will be displayed for configuring the variables:
Where:
Delimiter: CSV separator character, used to read the CSV and then create the JSON.
CSV CONVERTED TO JSON: here, after you click on the "Validate" button, the CSV converted to JSON format will be displayed.
Example CSV:
This operation allows you to convert a JSON table with different items (products, customers, etc.) to CSV format, so that this information can be used later in the flow.
To use this option, choose "Convert JSON to CSV" and then click "Save".
If you click to edit the module, the following area will be displayed for configuring the variables:
Fields:
Delimiter: CSV separator character, used to create the file in this format;
Convert arrays: this option allows you to ignore or convert the arrays of a code in JSON to CSV format;
JSON: enter the code in JSON format that needs to be converted;
JSON CONVERTED TO JSON: here, after you click the Validate button, the JSON converted to CSV format will be displayed.
JSON example:
Parameters
Both parameters will appear on the left-hand side of the configuration modal for each operation in the flow, as long as the operations are all connected by lines in the flow.
To finish configuring the module, click on "Save".
CSV: enter the text in CSV format that needs to be converted. If you prefer, click on the plus sign ( ) to configure a .
Each operation has its own parameter, which corresponds to the product of the conversion: JSON for the Convert CSV to JSON operation and CSV for the Convert JSON to CSV operation. When used, they produce the resulting code, which can later be manipulated by the module or by using a .
.