Parse CSV

Parses a CSV file in Make and returns an array with each object corresponding to the CSV row.

Parameters

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.

../../_images/make-parse-csv-output.webp

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:

  • SharePoint

  • Salesforce

  • Box

  • OneDrive

  • Google Drive

  • Dropbox

  • SFTP

  • File System

List of apps

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.

Examples

Basic

Download a source CSV file and use the output in the Parse CSV file action, or apply raw CSV.

Parse CSV file

Advanced

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.

Invitation example

The scenario looks like this:

Advanced example scenario

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:

Advanced example scenario

Source DOCX template:

Advanced example scenario

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.

Advanced example scenario

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.

Advanced example scenario

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.

Advanced example scenario