Menu
Connectors
Schema Validator Connector
Validate data against a JSON Schema and stop the workflow with a configurable HTTP-style error response if it fails.
On this page
What this connector is for
Validates a JSON value against a JSON Schema, and — unlike most connectors — stops the workflow with a configurable HTTP-style error response when validation fails, so you don't need a separate branch/condition step to check a boolean and halt manually. Complements Mapper (which validates too, but only fields it just reshaped) and JSONata (which transforms but never validates).
Validation runs on AJV with format support (ajv-formats) enabled, using AJV's Draft 7 compiler. A $schema field in your schema is stripped before compiling (it's metadata AJV doesn't need to compile against) — most Draft 2020-12 schemas validate correctly under this setup, but draft-specific keywords not supported by AJV 8's default dialect aren't guaranteed to work.
Validate Schema
Configuring it
- Data to Validate — required. The value to validate — usually a template reference like
{{trigger.body}}or{{someStep.response.data}}. If it's a string, it's parsed as JSON first; if parsing fails, the raw string is validated as-is (so a schema of{"type": "string"}still works against non-JSON input). - JSON Schema — required. The schema itself, JSON Schema Draft 7 or later, as a JSON string.
- Error Response Configuration — optional; if omitted, a default error response is used.
- HTTP Status Code — default
400. Must be 100–599. - Error Response Body — a string. If it contains the literal
{{errors}}, that's replaced with the JSON-stringified validation error array before the body is (attempted to be) parsed as JSON; otherwise the whole body is parsed as JSON if possible, or used as a literal string if not. - Error Response Headers — key/value pairs;
Content-Type: application/jsonis always added regardless of what you set here.
- HTTP Status Code — default
Reading the response
The shape differs by outcome:
- Validation passed — a plain result, nested under the action envelope:
{{<stepReference>.response.data.validated}}—true.{{<stepReference>.response.data.data}}— the validated data (JSON-parsed, if the input was a JSON string).
- Validation failed (or an unexpected error during validation) — an HTTP-style result, spread flat:
{{<stepReference>.response.status}}— the configured (or default 400) status code.{{<stepReference>.response.data}}— the error response body.{{<stepReference>.response.validationErrors}}— array of{path, message, schemaPath}, a sibling ofstatus/datahere, not nested underdata.
For example, a step named "Validate Order" (reference validateOrder) — on success, {{validateOrder.response.data.validated}} is true; on failure, check {{validateOrder.response.status}} to branch, and {{validateOrder.response.validationErrors}} for the specific field(s) that failed.
Example
Data to Validate: {{trigger.body}}
JSON Schema:
{
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "number", "minimum": 0}
},
"required": ["name", "age"]
}
A trigger body of {"name": "Ada"} (missing age) halts the workflow with {{validateOrder.response.status}} = 400 and {{validateOrder.response.validationErrors}} reporting the missing required field.
Also applies here
Step Name
What it's for
Every step in a workflow gets a name — either one you set or a default based on the connector and action (e.g. "Get Order Details", "Send Welcome Email"). It's shown throughout the UI and in your execution history, and it's also the source for the step's Reference — a camelCase identifier auto-generated from the name (e.g. "Get Order Details" → getOrderDetails) — which is what you actually use in {{...}} expressions to read this step's output from later steps. See Step Reference.
Rules
- Must be at least 2 characters, and 50 characters or fewer.
- Must be unique within the workflow — reusing a name that's already taken will be rejected, with a suggested alternative (e.g.
"Get Order Details 2"). - Can't be empty.
Tips
- Prefer a descriptive, human-readable name over a generic one — "Get Order Details" is easier to work with later than "HTTP Request 2", especially once a workflow has a dozen steps.
- Renaming a step updates every reference to it elsewhere in the workflow automatically.
Step Reference
Syntax
Any input field can reference earlier data using {{expression}}. The expression is evaluated as JSONata — so simple dot-paths and more advanced queries (filters, functions) both work.
Referencing a step's output
Use the step's Reference — a camelCase identifier auto-generated from its Name (e.g. "Get Order Details" → getOrderDetails), shown read-only wherever the step's fields are configured — followed by the field path. Elsewhere in these docs this general pattern is written as {{<stepReference>.field.path}}:
{{getOrderDetails.response.data.id}}
{{getOrderDetails.response.status}}
The raw display name won't work here even though it's what you see in the UI — {{Get Order Details.response.data.id}} isn't valid, since a bare name containing spaces isn't a single JSONata identifier. Always use the camelCase Reference.
You can also reference steps by position instead of by reference:
{{steps[0].response.data.id}}
Referencing trigger data
{{trigger.headers.authorization}}
{{trigger.body.customerId}}
{{trigger.query.page}}
{{trigger.params.orderId}}
{{trigger.method}}
{{trigger.path}}
Referencing workflow variables
{{variables.myVariable}}
See Variables for the full list of variable types and more examples, including connection-type variables.
Referencing runtime variables
A separate, mutable namespace written by the Variable connector while a run is in progress — not the same as the workflow-level variables above:
{{runtimeVariables.myVariable}}
Notes
- If an expression can't be resolved (a typo in a step name, a field that doesn't exist), it resolves to an empty string rather than failing the workflow — check your execution history if a value comes through blank.
- Object values are automatically JSON-stringified when interpolated into a string field.