Parse CSV in Power Automate
PDF4me Parse CSV action converts CSV (Comma-Separated Values) files to structured JSON data in Power Automate with flexible delimiter and header options. This powerful data transformation feature supports custom delimiters (comma, semicolon, tab, pipe, or custom characters), custom header names, automatic header detection from first line, or auto-generated column headers, with UTF-8 encoding support and automatic empty line removal, perfect for CSV data integration, database imports, API feeding, and automated data format conversion workflows across Microsoft 365.
Authenticating Your API Request
To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful CSV parsing services.

Key Features
- Flexible Delimiter Support: Parse comma, semicolon, tab, pipe, or custom delimiters
- Custom Headers: Define custom column headers or use from file
- Automatic Header Detection: Use first line as headers with SkipFirstLine option
- Auto-Generated Headers: Automatic Column1, Column2... generation when needed
- JSON Output: Structured JSON array of objects for easy integration
- UTF-8 Encoding: Full Unicode support for international characters
Parameters
Complete list of parameters for the Parse CSV action. Configure these parameters to control CSV parsing.
Important: Parameters marked with an asterisk (***) are required. The action outputs JSON data with filename
parsed_data.json.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content*** | Base64 | Source CSV File Content • Map CSV file from previous action output • Supports CSV files from SharePoint, OneDrive, email attachments • Can be dynamically retrieved from flow variables • Must be valid CSV document (UTF-8 encoded text) | [File Content from Get File] |
| File Name*** | String | CSV Document Name • Specify CSV file name with extension (.csv, .txt) • Used for processing and output file naming • Must include proper file extension • Supports dynamic naming from flow variables | data.csv |
| Delimiter*** | String | Column Delimiter Character(s) • Character(s) separating columns • Common delimiters: , (comma - standard CSV), ; (semicolon - European CSV), \t (tab - TSV files), | (pipe - database exports), ␣ (space)• Supports multi-character delimiters (e.g., ", " for comma-space) • Required - must be specified | , |
| Column Headers | String | Comma-Separated Custom Headers • Define custom header names • Format: "Name,Age,Email" • Header Priority 1 (Highest): If provided → Uses custom headers, SkipFirstLine ignored, ALL CSV lines treated as data (including first line) • If empty: Use Priority 2 (file headers) or Priority 3 (auto-generated) • Parsing Behavior: Headers/values trimmed of whitespace; Fewer values than headers → fills with empty strings; More values than headers → extra values ignored | FullName,Age,Email |
| Skip First Line | Boolean | Use First Line as Headers • Header Priority 2: If true AND ColumnHeaders empty → Uses first CSV line as headers, data starts from second line • Header Priority 3: If false AND ColumnHeaders empty → Auto-generates headers ("Column1", "Column2"...), all lines are data • Default: false • Ignored when ColumnHeaders provided | true |
Output
The PDF4me Parse CSV action returns comprehensive JSON output data for seamless Power Automate flow integration:
- Table
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| document | Base64 | JSON data as UTF-8 byte array |
| FileName | String | Output filename: "parsed_data.json" (fixed) |
| Success | Boolean | true if operation successful, false if failed |
| Error Message | String | Error description (null if successful) |
| Errors | Array | List of detailed error information (empty array if successful) |
JSON Response Format
The raw JSON response from the action:
{
"document": "[Base64 JSON Data]",
"FileName": "parsed_data.json",
"Success": true,
"ErrorMessage": null,
"Errors": []
}
JSON Content Example (in document field):
[
{"Name": "John Doe", "Age": "30", "Department": "IT"},
{"Name": "Jane Smith", "Age": "28", "Department": "HR"},
{"Name": "Bob Johnson", "Age": "35", "Department": "Sales"}
]
Error Response Example:
{
"document": null,
"FileName": null,
"Success": false,
"ErrorMessage": "Document is empty",
"Errors": [
{
"Code": "DOCUMENT_ERROR",
"Message": "CSV content cannot be null or empty"
}
]
}
Power Automate Flow Usage
Use parsed JSON data in subsequent actions:
- API Integration: Send CSV data as JSON to REST APIs
- Database Import: Load CSV data into SQL databases
- Excel Population: Convert CSV to JSON, then populate Excel with "Add Rows"
- Data Validation: Parse CSV and validate data before processing
- Format Conversion: Convert CSV exports to JSON for other systems
- CRM Integration: Feed CSV data into Dynamics 365 or Salesforce
Common Error Messages
Understanding and troubleshooting errors helps ensure smooth CSV parsing workflows:
| Error Message | Cause | Solution |
|---|---|---|
| "Request is empty" | Request object is null | Provide valid request object |
| "Document is empty" | Document object is null or CSV content is null | Provide valid CSV file content |
| Encoding exceptions | CSV content not UTF-8 encoded | Ensure CSV file is UTF-8 encoded |
| Empty array output | CSV content is empty or only has headers | Provide CSV file with data rows |
Note: CSV parsing is permissive - malformed data returns empty array instead of errors.
Workflow Examples
The PDF4me Parse CSV action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Database Import
- API Integration
- Excel Conversion
- Data Validation
Automated CSV to Database Import Workflow
Transform your data import with automated CSV parsing and database loading:
Complete Workflow Steps:
- Trigger: CSV file uploaded to SharePoint "Imports" folder
- Get CSV File: Retrieve uploaded CSV file from SharePoint
- Parse CSV: Set Delimiter = ",", SkipFirstLine = true
- Get JSON Data: Extract parsed JSON from document field
- Parse JSON Array: Convert to individual objects
- Loop Through Records: Use Apply to each for JSON array
- Insert to SQL: Execute SQL INSERT for each record
- Log Results: Record successful/failed imports
- Move File: Move processed CSV to "Processed" folder
- Send Summary: Email admin with import statistics
Business Benefits:
- Imports 500+ CSV rows to database daily automatically
- Converts CSV format to JSON for database compatibility
- Eliminates manual CSV import and data entry
- Reduces import time from 2 hours to 5 minutes
Automated CSV to REST API Integration Workflow
Streamline your API integration with CSV-to-JSON conversion:
Complete Workflow Steps:
- Trigger: CSV export completed in source system
- Get Export File: Retrieve CSV export from email attachment or storage
- Parse CSV: Delimiter = ";", SkipFirstLine = true (European format)
- Extract JSON: Get parsed JSON array from response
- Transform Data: Apply business logic transformations if needed
- Loop Records: Apply to each for JSON objects
- Post to API: HTTP POST each record to REST API endpoint
- Handle Responses: Collect success/failure results
- Update Status: Mark records as imported in source system
- Archive CSV: Store original CSV in archive folder
Business Benefits:
- Integrates 200+ CSV records with APIs weekly
- Handles European CSV format (semicolon delimiter)
- Automates cross-system data synchronization
- Eliminates manual CSV-to-API data transfer
Automated CSV to Excel Conversion Workflow
Optimize your file format conversion with CSV-to-Excel transformation:
Complete Workflow Steps:
- Trigger: CSV report generated by legacy system
- Get CSV Report: Retrieve CSV file from file share or email
- Parse CSV: Delimiter = "\t" (tab-delimited), SkipFirstLine = true
- Get JSON Data: Extract parsed JSON array
- Create Excel Template: Get blank Excel template from library
- Populate Excel: Use "Add Rows" action with JSON data
- Format Excel: Apply formatting with other actions if needed
- Save as Excel: Store formatted Excel file
- Email Distribution: Send Excel file to stakeholders
- Archive CSV: Move original CSV to archive
Business Benefits:
- Converts 30+ CSV files to Excel monthly automatically
- Handles tab-delimited legacy system exports
- Provides Excel format for users who prefer it
- Adds professional formatting to raw CSV data
Automated CSV Data Validation Workflow
Enhance your data quality with automated CSV parsing and validation:
Complete Workflow Steps:
- Trigger: CSV data submission received via email
- Get Attachment: Extract CSV attachment from email
- Parse CSV: Set custom ColumnHeaders = "CustomerID,Name,Email,Phone"
- Set Delimiter: Delimiter = "," (standard CSV)
- Get Parsed Data: Extract JSON array from response
- Loop for Validation: Apply to each for JSON objects
- Validate Fields: Check required fields, email format, phone format
- Build Error Report: Compile validation errors with row numbers
- Send Results: Email submitter with validation pass/fail report
- Process Valid Data: Import only valid records to system
Business Benefits:
- Validates 100+ CSV submissions weekly automatically
- Uses custom headers for consistent field mapping
- Provides detailed validation feedback to submitters
- Reduces data quality issues by 75%
Industry Use Cases & Applications
- IT & System Integration
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations & Supply Chain
- Education & Research
IT & System Integration Use Cases
- Legacy System Integration: Parse CSV exports from legacy systems to JSON
- API Data Feed: Convert CSV data to JSON for REST API consumption
- Database Migration: Parse CSV files for database import operations
- Log File Processing: Parse CSV-formatted log files for analysis
Finance & Accounting Use Cases
- Bank Statement Import: Parse CSV bank statements to JSON for processing
- Transaction Processing: Convert CSV transaction exports to structured JSON
- GL Data Import: Parse chart of accounts CSV exports for ERP import
- Invoice Processing: Convert CSV invoice data to JSON for automation
Sales & Marketing Use Cases
- Lead Import: Parse CSV lead lists from marketing platforms
- Campaign Data: Convert CSV campaign results to JSON for analysis
- Contact Import: Parse CSV contact exports from various sources
- Sales Data Integration: Convert CSV sales reports to JSON for CRM import
Human Resources Use Cases
- Payroll Data: Parse CSV timesheets for payroll system import
- Employee Import: Convert CSV employee data to JSON for HRIS
- Benefits Enrollment: Parse CSV enrollment data for processing
- Attendance Records: Convert CSV attendance exports to structured JSON
Operations & Supply Chain Use Cases
- Inventory Import: Parse CSV inventory exports to JSON for system import
- Order Processing: Convert CSV order data to JSON for processing
- Shipping Data: Parse CSV shipping manifests for logistics systems
- Supplier Data: Convert CSV vendor lists to JSON for procurement
Education & Research Use Cases
- Student Data Import: Parse CSV student rosters for SIS import
- Grade Import: Convert CSV grade exports to JSON for processing
- Research Data: Parse CSV experimental results for analysis systems
- Survey Results: Convert CSV survey exports to structured JSON