Parses a CSV file in Make and returns an array with each object corresponding to the CSV row.
Output Parameters
Parameter |
Description |
Example |
---|---|---|
Items |
The collection of objects. Each object represents a CSV row and has properties corresponding to the CSV headers. |
Each CSV header is represented by an output parameter. You can refer to a single item selecting it in the scenario. |
Input Parameters
Parameter |
Description |
Example |
---|---|---|
Connection |
To allow your scenarios to get information from and send it to Plumsail Documents, you need to create a connection. |
For more information on how to create a connection to Plumsail Documents, see the online Help. |
Input type |
Defines the source of the CSV. |
CSV File or Raw CSV |
File |
The raw content of the source CSV file. You can extract file content from other apps like:
|
It is content of the source file. |
CSV Headers |
Comma separated headers. The output will have these headers for properties’ keys. Value will be taken from the corresponding column. |
You need to specify the headers in the same order as in the CSV file. Ex.: Id, FirstName, LastName, Company, Email |
Skip first Line |
Select ‘Yes’ if your CSV has headers in the first row. |
If your CSV file has headers as a first row the select ‘Yes’. In that case the action will start collecting the values from the second line of the CSV file. If you select ‘No’, or the empty value then the action will start collecting values from the first line of the CSV file. |
Delimiter |
Delimiter of columns. By default it’s a comma. |
You can select from the following default values: Comma, Semicolon, Tab or Pipe |
Limit |
Returns the first “n” rows |
You can limit the number of returned rows from the source document. |
Locale |
The locale that will be applied to the source document. |
Specify the locale to correctly parse currencies, dates, and other dependent values. Different countries use different separators for numbers, and the action handles them correctly. |
Download a source CSV file and use the output in the Parse CSV file action, or apply raw CSV.
Let’s check an example of how to read a CSV file and use the output to generate invitations in PDF format with the Create document from DOCX template action.
The scenario looks like this:
In this example, we store our source CSV file and DOCX template in a OneDrive folder, although you can retrieve data from any other sources. These are links to download the demo files:
First two actions download these source files.
Source CSV file:
Source DOCX template:
Next, we add the Parse CSV action to extract information from the source CSV file. In the CSV Headers field, we specify the headers from the file to select the dynamic content in the following step. In our example, we will use the customer’s first name, last name, and company name. Additionally, we enable the Skip First Line option to start reading data from the second row, as the first row contains the headers.
Note
In the advanced settings, you can select the locale to correctly parse currencies, dates, and other dependent values. Different countries use different separators for numbers, and the action handles them correctly.
After extracting the values from the CSV file we can create invitations for each person from the list. For this we use the Create document from DOCX template action along with the dynamic content from the Parse CSV action. Also, we select PDF as the output type.
Finally, we create a separate PDF file for each person using Company headers from the Parse CSV action to name the result PDFs. You can also use the Send Email action to send these invitations.