A validator for n8n workflow JSON files
Project description
valn8n
A validator for n8n workflow JSON files. Like ruff for Python, but for your n8n workflows.
Checks for errors, warning, and hints regarding syntax and semantics of workflows. Output in different formats (rich in terminal, text, JSON, CSV), most LLMs seem to work with 'text' quite well (tightly followed by JSON, but more tokens).
Also, valn8n allows me to asses the quality or hidden traps of workflows downloaded from the web, saving a lot of time not bothering with sometimes totally broken workflows.
Background
I have been testing n8n on and off with LLM assisted workflow generation and couldn't find a n8n workflow validator that would find whatever silly mistake an LLM (even flagship ones) could sometimes generate.
With valn8n however I can have the LLMs autocorrect those errors and am getting most n8n workflows as one-shot.
Requirements
- Python >= 3.13
- uv package and project manager
Installation
uv tool install valn8n
Quick Start
valn8n check my_workflow.json
valn8n check --strict-only my_workflow.json
See also README in supplied demo workflows in demo_valn8n/broken_vs_notbroken.
Usage
Check a single file
valn8n check workflow.json
Check a directory
valn8n check workflows/
Select specific rules
Only check rules ND01xx and ND05xx.
valn8n check --select ND01,ND05 workflow.json
Ignore specific rules
Ignore ND05xx and ND0802.
valn8n check --ignore ND05,ND0802 workflow.json
Switching back on ignored rules
Ignore ND05xx but not ND0502.
valn8n check --ignore ND05 --extend-select ND0502 workflow.json
Strict-only mode
Run only strict rules, skipping advisory and hint rules:
valn8n check --strict-only workflow.json
JSON output (for CI)
valn8n check --fmt json workflow.json
Quiet mode (summary only)
valn8n check -q workflow.json
Tolerate unknown node keys
valn8n check --tolerate-node-keys '*' workflow.json
List all rules
valn8n rule
Output Formats
| Format | Flag | Description |
|---|---|---|
| Rich | --fmt rich |
Colored terminal output (default) |
| Text | --fmt text |
Plain text |
| JSON | --fmt json |
Machine-readable JSON |
| CSV | --fmt csv |
Comma-separated values |
| List | --fmt lst |
One diagnostic per line |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | No violations found |
| 1 | Violations found |
| 2 | Error (e.g. file not found, invalid arguments) |
Rules
| Group | Range | Description |
|---|---|---|
| IO | IO00xx | File I/O validation (read errors, invalid JSON) |
| ND01 | ND01xx | Filter operations (invalid ops, common mistakes) |
| ND02 | ND02xx | Node structure (unknown keys, value types, zero-property params) |
| ND03 | ND03xx | Parameter validation (deep param keys, param value types) |
| ND04 | ND04xx | Expression syntax (broken brackets, suspect prefixes) |
| ND05 | ND05xx | Credential validation (missing, empty, placeholder, leaking) |
| ND06 | ND06xx | Connection validation (unconnected inputs, dangling refs) |
| ND07 | ND07xx | Error handling (missing errorWorkflow, unhandled errors) |
| ND08 | ND08xx | Naming & documentation (default names, missing notes) |
Rules ND01xx-ND04xx and ND06xx are strict (structural correctness). ND05xx and 07xx are advisory (best practices). ND08xx are hints (atm only regarding naming clarity and documentation).
Note: in future this may change and strict/advisory might not be clean ranges anymore.
Use --strict-only to run only strict rules.
Run valn8n rule to see the full list with descriptions.
Contributing
I do not accept PRs with code changes at the moment. But feel free to post issues (with full workflows attached) in case you think there is an error in valn8n, or if you see an opportunity to improve it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file valn8n-0.1.1.tar.gz.
File metadata
- Download URL: valn8n-0.1.1.tar.gz
- Upload date:
- Size: 266.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5289b4315b580a088ba1e88e05799ed3352c24e4b0392b580344816ad1d57a8c
|
|
| MD5 |
1386543de057574f2be12e63cb5d00a0
|
|
| BLAKE2b-256 |
95aa8ec5b2808340a690420a2442ae06478a04c1e52c4c2f9513ea33b942439e
|
File details
Details for the file valn8n-0.1.1-py3-none-any.whl.
File metadata
- Download URL: valn8n-0.1.1-py3-none-any.whl
- Upload date:
- Size: 237.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123b3d36de422db319359cda5ac6cdd2af8403608bbf7e8b4d13af41d737f22e
|
|
| MD5 |
0f8c88f0fa802428e629d5b555c348d9
|
|
| BLAKE2b-256 |
dcbc989c1cf1d36550f085330d2001de8b8ced05426a3b2350bbca7beeb609db
|