@iamfj/n8n-nodes-schema-validation
v0.1.2
Published
JSON Schema validation node for n8n workflows with dual output routing
Downloads
36
Maintainers
Readme
@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.
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Nodes Installation
- Go to Settings > Community Nodes in your n8n instance
- Select Install
- Enter
@iamfj/n8n-nodes-schema-validationin the search field - Click Install
Manual Installation
For self-hosted n8n instances, you can install via npm:
npm install @iamfj/n8n-nodes-schema-validationThen restart your n8n instance.
Features
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:
{
"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.
Architecture
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 testsSee helpers/README.md for detailed documentation.
Credentials
None of the current nodes require credentials. All operations are performed locally within your n8n instance.
Contributing
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.
Development Setup
# Install dependencies
bun install
# Build the project
bun run build
# Run in development mode
bun run dev
# Run linting
bun run lint
# Format code
bun run format
# Run unit tests
bun test
# Run tests in watch mode
bun test --watch
# Run tests with coverage
bun test --coverageResources
License
MIT © Fabian Jocks
Issues & Support
If you encounter any issues or have questions:
Changelog
See CHANGELOG.md for version history and release notes.
Made with ❤️ in Ruhrgebiet for the n8n community
