Universal CSV to JSON API Converter
detail.loadingPreview
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
About This Workflow
This robust n8n workflow provides a powerful, self-hosted API endpoint for converting Comma Separated Values (CSV) data into JavaScript Object Notation (JSON). Designed for flexibility, it intelligently handles CSV input from various sources: direct file uploads (e.g., via curl), raw text in the request body, or even existing JSON payloads. Beyond its core conversion capability, the workflow incorporates comprehensive error handling, delivering clear JSON responses for both success and failure scenarios. Critical errors are also automatically routed to a Slack channel, ensuring your data processing remains monitored and reliable, making it an ideal tool for integration into backend services, ETL pipelines, or custom applications.
Key Features
- Flexible Input Methods: Accepts CSV data via file upload (binary), raw
text/plainbody, orapplication/jsonpayloads. - Custom API Endpoint: Exposes a dedicated webhook URL for seamless integration with any system.
- Intelligent Error Handling: Provides clear, descriptive JSON error messages and appropriate HTTP status codes (500 for errors, 200 for success).
- Real-time Error Monitoring: Automatically sends Slack notifications with execution details for immediate issue detection.
- Configurable Responses: Returns the converted JSON directly on success, wrapped in a structured response.
How To Use
- Deploy the Workflow: Import this JSON into your n8n instance and activate the webhook. Your unique webhook URL will be generated.
- Configure Input: Choose your preferred method to send CSV data to the webhook:
- File Upload (e.g.,
curl): Send a POST request withContent-Type: text/csvand your CSV file as binary data (e.g.,curl -X POST "YOUR_WEBHOOK_URL" -H "Content-Type: text/csv" --data-binary @path/to/your/file.csv). - Raw Text Body: Send a POST request with
Content-Type: text/plainand your CSV content directly in the request body. - Application JSON: If the CSV data is embedded in a JSON payload, the workflow can also be adapted to extract it.
- File Upload (e.g.,
- Customize Error Notifications (Optional): Update the 'Send to Error Channel' Slack node with your desired webhook or OAuth credentials and channel ID.
- Process Response: The workflow will return JSON data (status OK, with your converted data) or an error message if the conversion fails.
Apps Used
Workflow JSON
{
"id": "1dbf8083-ab4f-466c-9d0f-399f621f6626",
"name": "Universal CSV to JSON API Converter",
"nodes": 19,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 1dbf8083-ab4f...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.