Package Information
Released: 1 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0
Author: SAP Joule
Available Nodes
Documentation generating…
Documentation
n8n-nodes-schema-webhook
A custom n8n trigger node that behaves like the built-in Webhook node, but lets you define a JSON Schema that incoming requests must satisfy. Requests that don't match the schema are rejected with an HTTP error (400 by default) and the workflow never runs — turning your webhook into an enforceable contract.
What it does
- Exposes an HTTP endpoint (choose method + path), exactly like the Webhook node.
- Lets you paste a JSON Schema (draft-07) for the request body, query params, and/or headers — each optional.
- On a valid request: passes
{ body, query, headers, params }into the workflow. - On an invalid request: responds with the configured status code (default
400) and a JSON body listing the AJV validationfailures; the workflow does not execute.
Node fields
| Field | Description |
|---|---|
| HTTP Method | GET / POST / PUT / PATCH / DELETE / HEAD (default POST) |
| Path | Endpoint path — reachable at /webhook/<path> (prod) and /webhook-test/<path> (test) |
| Respond | Immediately (200 on receipt) or When Last Node Finishes |
| Body JSON Schema | Schema the body must satisfy; empty or {} skips it |
| Query JSON Schema | Optional; note query values are strings |
| Headers JSON Schema | Optional; header names are lower-cased |
| Options → Invalid Request Status Code | Status code on validation failure (default 400) |
Example schema (body)
{
"type": "object",
"required": ["email"],
"properties": {
"email": { "type": "string", "format": "email" }
},
"additionalProperties": false
}
POST an empty {} → 400 with error details. POST {"email":"a@b.com"} → 200, workflow runs.
Build
npm install
npm run build # compiles to dist/ and copies the icon
npm run lint
Dependencies
Bundles ajv ^8.18.0 and ajv-formats ^3.0.1 for validation (declared in dependencies, so they install with the node).