Parse CSV and convert to JSON using n8n action
PDF4me Parse CSV translates text-based CSV/TSV files into clean JSON arrays from any n8n workflow. Drop in files from SharePoint, S3, or email attachments, pick a delimiter, decide whether to use custom headers or the first row, and instantly receive structured JSON for APIs, databases, or Excel insertion.
Setup
Add the PDF4me “Parse CSV” node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites
- PDF4me API credentials
- n8n workflow access
Configuration
- Add the PDF4me node to the workflow
- Select the "Parse CSV and convert to JSON" action
- Provide the CSV source, delimiter, and header strategy

Parameters
Important: Parameters marked with an asterisk (***) are required. PDF4me outputs a JSON array serialized as UTF-8 bytes.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | CSV source (Binary Data, Base64 String, URL). | Binary Data |
| Input Binary Field*** | Binary | Required when reading from a binary attachment. | {{ $binary.data }} |
| Base64 Document Content*** | String | Required when providing base64 CSV text. | VXNlcm5hbWUsRW1haWwK... |
| Document URL*** | String | Required for public HTTP(S) URLs. | https://files.example.com/leads.csv |
| File Name*** | String | Name of the CSV file (for reference/logging). | leads.csv |
| Delimiter*** | String | Field separator (,, ;, \t, ` | `, or custom multi-character string). |
| Column Headers | String | Optional comma-separated list of headers. Overrides file headers when provided. | FirstName,LastName,Email |
| Skip First Line | Boolean | When true and Column Headers is empty, the first CSV line becomes headers. false auto-generates Column1, Column2... | true |
| Binary Data Output Name*** | String | Binary slot storing the JSON file (e.g., parsed_data.json). | document |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| txtFileName | String | TXT output filename - The name of the generated TXT file containing parsed CSV data | parsed_data.txt |
| jsonFileName | String | JSON output filename - The name of the generated JSON file containing parsed CSV data | parsed_data.json |
| txtFileSize | Number | TXT file size in bytes - The size of the TXT output file in bytes | 657614 |
| jsonFileSize | Number | JSON file size in bytes - The size of the JSON output file in bytes | 657614 |
| success | Boolean | PDF4me operation status - Boolean flag indicating the success or failure of the CSV parsing process. PDF4me returns true for successful operations and false for any errors | true |
| originalFileName | String | Original CSV filename - The name of the input CSV file | data.csv |
| delimiter | String | Delimiter used - The field separator character(s) that was used for parsing the CSV | , |
| skipFirstLine | Boolean | First line skip status - Indicates whether the first line was skipped. true if first line was used as headers, false if first line was treated as data | false |
| columnHeaders | String | Column headers source - Description of where column headers came from. Shows "from CSV" if headers were read from the file, or the custom headers if provided | from CSV |
| cultureName | String | Culture/Locale code - Culture code used for parsing (e.g., "en-US", "de-DE", "fr-FR") | en-US |
| message | String | Operation message - Descriptive message indicating the result of the CSV parsing operation | Successfully converted CSV and created TXT and JSON outputs |
N8N Action Response
The PDF4me Parse CSV and convert to JSON API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"txtFileName": "parsed_data.txt",
"jsonFileName": "parsed_data.json",
"txtFileSize": 657614,
"jsonFileSize": 657614,
"success": true,
"originalFileName": "data.csv",
"delimiter": ",",
"skipFirstLine": false,
"columnHeaders": "from CSV",
"cultureName": "en-US",
"message": "Successfully converted CSV and created TXT and JSON outputs"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| txtFileName | parsed_data.txt |
| jsonFileName | parsed_data.json |
| txtFileSize | 657614 |
| jsonFileSize | 657614 |
| success | true |
| originalFileName | data.csv |
| delimiter | , |
| skipFirstLine | false |
| columnHeaders | from CSV |
| cultureName | en-US |
| message | Successfully converted CSV and created TXT and JSON outputs |
Note: The action returns two binary outputs - data_txt (TXT format) and data_json (JSON format), both containing the same parsed CSV data.
Schema View
The data structure and types of the response:
1 item
txtFileName: T parsed_data.txt
jsonFileName: T parsed_data.json
txtFileSize: # 657614
jsonFileSize: # 657614
success: ☑ true
originalFileName: T data.csv
delimiter: T ,
skipFirstLine: ☑ false
columnHeaders: T from CSV
cultureName: T en-US
message: T Successfully converted CSV and created TXT and JSON outputs
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array
Binary Data View
The parsed CSV data is returned as two binary files - one in TXT format and one in JSON format:
data_txt
─────────────────────────────
File Name: parsed_data.txt
File Extension: txt
Mime Type: text/plain
File Size: 657.6 kB
data_json
─────────────────────────────
File Name: parsed_data.json
File Extension: json
Mime Type: application/json
File Size: 657.6 kB
Binary Data Access:
- TXT Binary Object:
$binary.data_txt.data - JSON Binary Object:
$binary.data_json.data - Base64 Content: Available for direct use in both formats
- File Operations: Ready for download, email, or storage
Use Cases
- Database loads: Convert CSV exports to JSON before executing SQL inserts or REST calls.
- Excel population: Parse CSV, then feed the resulting JSON straight into “Add Rows”.
- Data validation/masking: Turn CSV submissions into JSON for rule checks, transformations, or redaction workflows.