deeptech-data-validation

n8n node for JSON Schema validation with Ajv

Package Information

Downloads: 195 weeklyĀ /Ā 386 monthly
Latest Version: 1.0.5
Author: DeepTech IA - Simon EL.

Documentation

n8n-nodes-deeptech-data-validation

n8n Community Node
License

A powerful n8n node to validate, clean, and route your data using the JSON Schema standard. Ideal for securing your workflows and ensuring data quality before processing.

Developed by DeepTech IA.


✨ Key Features

  • Robust Validation: Uses the standard Ajv engine (supports JSON Schema Draft 7+).
  • Data Cleaning (Coercion): Can automatically convert types (e.g., "123" string becomes 123 number) using "Lenient" mode.
  • Smart Routing: Automatically separates data:
    • āœ… Output 1: Valid Items.
    • āŒ Output 2: Invalid Items (with full error details).
  • Advanced Formats: Natively validates emails, dates, URLs, IPs, etc.

šŸš€ Installation

Via Community Node Repository (Recommended)

  1. In your n8n instance, go to Settings > Community Nodes.
  2. Click on Install.
  3. Search for the package name: n8n-nodes-deeptech-data-validation.
  4. Install and wait for the reload.

Via Docker (Manual)

Add this command to your Dockerfile or install it in the ~/.n8n volume:

npm install n8n-nodes-deeptech-data-validation

šŸ›  Usage Guide

  1. Add the Data Validation node to your workflow.
  2. Connect your data source (e.g., Webhook, Typeform, Google Sheets).
  3. Configure your validation rules in the node panel.

Configuration Parameters

Parameter Option Description
JSON Schema JSON The schema defining the expected structure of your data.
Validation Mode Strict Data must match exactly (e.g., a number must be a number).
Validation Mode Lenient Attempts to coerce types (e.g., "true" string becomes boolean true).
On Error Route Sends invalid items to the "Invalid" output (does not stop the workflow).
On Error Stop Stops the workflow immediately if an error is detected.

šŸ“š Schema Cookbook

Copy and paste these schemas directly into the node.

1. Basic User (Email + Name)

Checks that an email is valid and the name exists.

{
  "type": "object",
  "properties": {
    "name": { "type": "string", "minLength": 2 },
    "email": { "type": "string", "format": "email" },
    "age": { "type": "integer", "minimum": 18 }
  },
  "required": ["name", "email"]
}

2. E-commerce Product

Validates a product with tags and a positive price.

{
  "type": "object",
  "properties": {
    "sku": { "type": "string", "pattern": "^[A-Z]{3}-\\d{3}$" },
    "price": { "type": "number", "exclusiveMinimum": 0 },
    "tags": {
      "type": "array",
      "items": { "type": "string" },
      "minItems": 1
    },
    "inStock": { "type": "boolean" }
  },
  "required": ["sku", "price"]
}

3. Nested Complex Data

An address object inside a profile.

{
  "type": "object",
  "properties": {
    "username": { "type": "string" },
    "contact": {
      "type": "object",
      "properties": {
        "phone": { "type": "string" },
        "address": {
            "type": "object",
            "properties": {
                "city": { "type": "string" },
                "zip": { "type": "string", "pattern": "^\\d{5}$" }
            },
            "required": ["city"]
        }
      }
    }
  }
}

ā“ Troubleshooting & Support

Why do my items go to "Invalid"?

Check the output of the "Invalid Items" branch. Each object contains a special _validationErrors field explaining exactly why:

{
  "name": "Bob",
  "email": "bob-at-gmail.com",
  "_validationErrors": [
    {
      "path": "/email",
      "message": "must match format \"email\""
    }
  ]
}

Contact

For any questions, suggestions, or enterprise support:
šŸ“§ Email: deeptech.fr.ia@gmail.com


Generated with ā¤ļø by DeepTech IA for the n8n community.

Discussion