Skip to main content

Csv to JSON converter with error handling and Slack notifications

Workflow preview

Workflow preview
100%
Csv to JSON converter with error handling and Slack notifications preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who this template is for This template is for developers or teams who need to convert CSV data into JSON format through an API endpoint, with support for both file uploads and raw CSV text input. U...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.extractfromfile, n8n-nodes-base.respondtowebhook, n8n-nodes-base.set, n8n-nodes-base.switch, n8n-nodes-base.slack, n8n-nodes-base.code, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by n8n Team.

Original n8n.io source

1.1 Workflow description

Title
Csv to JSON converter with error handling and Slack notifications
Workflow name
Csv to JSON converter with error handling and Slack notifications

Who this template is for

This template is for developers or teams who need to convert CSV data into JSON format through an API endpoint, with support for both file uploads and raw CSV text input.

Use case

Converting CSV files or raw CSV text data into JSON format via a webhook endpoint, with error handling and notifications. This is particularly useful when you need to transform CSV data into JSON as part of a larger automation or integration process.

How this workflow works

  1. Receives POST requests through a webhook endpoint at
/tool/csv-to-json
  1. Uses a Switch node to handle different input types:
    • File uploads (binary data)
    • Plain text CSV data
    • JSON format data
  2. Processes the CSV data:
    • For files: Uses the Extract From File node
    • For raw text: Converts the text to CSV using a custom Code node that handles both comma and semicolon delimiters
  3. Aggregates the processed data and returns:
    • Success response (200): Converted JSON data
    • Error response (500): Error message with details
  4. In case of errors, sends notifications to a Slack error channel with execution details and a link to debug

Set up steps

  1. Configure the webhook endpoint by deploying the workflow
  2. Set up Slack integration for error notifications:
    • Update the Slack channel ID (currently set to "C0832GBAEN4")
    • Configure OAuth2 authentication for Slack
  3. Test the endpoint using either:
    • CURL for file uploads:

      bash
      Copy
      curl -X POST "https://yoururl.com/webhook-test/tool/csv-to-json" \
           -H "Content-Type: text/csv" \
           --data-binary @path/to/your/file.csv
      
    • Or send raw CSV data as text/plain content type

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Extract From File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 4 - Error Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 5 - Success Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 6 - Change Field

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 7 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 9 - Send to Error Channel

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.1

Block 10 - Convert Raw Text To CSV

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Check if Value

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - Send Raw CSV

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - POST

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1.1

Block 15 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 16 - Aggregate1

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 17 - Success Response2

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

3. Summary Table

Workflow Csv to JSON converter with error handling and Slack notifications
Complexity advanced
Nodes 17
Categories Document Extraction
Author n8n Team
Published 15 Jan 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2732/2732.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Csv to JSON converter with error handling and Slack notifications do?

Who this template is for This template is for developers or teams who need to convert CSV data into JSON format through an API endpoint, with support for both file uploads and raw CSV text input. U...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.