JSON Schema validation node for n8n workflows with dual output routing
npm install @iamfj/n8n-nodes-schema-validation

JSON Schema validation node for n8n workflows. Validate your data against JSON Schema standards with error output routing.
n8n is a fair-code licensed workflow automation platform.
> โ
n8n Cloud Compatible
>
> This package has all dependencies bundled and is fully compatible with n8n Cloud.
Follow the installation guide in the n8n community nodes documentation.
1. Go to Settings > Community Nodes in your n8n instance
2. Select Install
3. Enter @iamfj/n8n-nodes-schema-validation in the search field
4. Click Install
For self-hosted n8n instances, you can install via npm:
``bash`
npm install @iamfj/n8n-nodes-schema-validation
Then restart your n8n instance.
Validates JSON data against a JSON Schema using n8n's "Continue on Fail" error handling pattern.
Features:
- โ
Validate incoming data against JSON Schema standards
- โ ๏ธ Error output routing with "Continue on Fail" mode
- ๐ฏ Support for custom JSON input via expressions
- ๐ Detailed validation error messages with field paths
- โก Built on AJV - fast and reliable JSON Schema validator
- ๐งช 100% test coverage with comprehensive unit tests
- ๐ฆ All dependencies bundled for n8n Cloud compatibility
Use Cases:
- Data quality checks before processing
- API response validation
- Form data validation
- ETL pipeline data verification
- Contract testing between workflows
Configuration:
- JSON Schema: Define your validation schema (JSON Schema Draft 7 format)
- Data Source: Choose between "Input Data" or "Custom JSON"
- Custom JSON: Optional field for n8n expressions (e.g., {{ $json.data }})
Example:
`json`
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "number", "minimum": 0 },
"email": { "type": "string", "format": "email" }
},
"required": ["name", "email"]
}
Output:
- Default Output: Items that pass validation
- Error Output: Items that fail validation (when "Continue on Fail" is enabled)
Enable "On Error -> Continue (using error output)" in node settings to route failed validations to the error branch instead of stopping execution.
The node is built following clean code principles with testable units:
``
SchemaValidator/
โโโ SchemaValidator.node.ts # Main node implementation
โโโ types.ts # TypeScript interfaces
โโโ helpers/
โโโ schemaParser.ts # Schema parsing logic
โโโ dataExtractor.ts # Data extraction logic
โโโ validator.ts # Validation logic with AJV
โโโ __tests__/ # Comprehensive unit tests
See helpers/README.md for detailed documentation.
None of the current nodes require credentials. All operations are performed locally within your n8n instance.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
`bashInstall dependencies
bun install
- n8n Community Nodes Documentation
- JSON Schema Documentation
- AJV JSON Schema Validator
MIT ยฉ Fabian Jocks
If you encounter any issues or have questions:
- Report a bug
- Request a feature
- Ask a question
See CHANGELOG.md for version history and release notes.
---
Made with โค๏ธ in Ruhrgebiet for the n8n community