Menu
Connectors
JWT Connector
Sign, decode, and verify HMAC-based JSON Web Tokens (HS256/HS384/HS512) as a workflow step.
On this page
What this connector is for
Signs, decodes, and verifies JSON Web Tokens as a workflow step — e.g. to create a token another API expects, or to check one you received. All signing/verification here is HMAC-based (HS256/HS384/HS512) with a shared secret.
This is a separate feature from a route's own Requires Auth: JWT option, which verifies an incoming request's bearer token before the workflow even starts (also HMAC HS256/HS384/HS512, coincidentally the same algorithm set, but unrelated code and unrelated configuration) — that one gates access to a route; this connector's actions are ordinary steps you place anywhere in a route's own logic.
Generate JWT
Configuring it
- Secret — required, at least 8 characters. The shared secret used to sign the token. Use a workflow variable (e.g.
{{variables.secretKey}}) rather than typing a real secret directly into the step. - Payload — required. A JSON object of claims (e.g.
sub, custom claims). Can be typed as a JSON string or a native object — either is accepted. - Expiration Time — optional, e.g.
1h,7d,30m,365d. Leave empty for a token that never expires. Ignored (with a logged warning, not an error) if Payload already includes its ownexpclaim. - Algorithm —
HS256(default),HS384, orHS512.
Reading the response
{{<stepReference>.response.data.token}}— the signed JWT string.{{<stepReference>.response.data.payload}}— the final payload actually encoded (includesexpif one was set).{{<stepReference>.response.data.expiresAt}}— an ISO timestamp, present only if the token has an expiration (from Expiration Time or anexpalready in Payload).
For example, a step named "Sign Partner Token" (reference signPartnerToken) — use {{signPartnerToken.response.data.token}} as a bearer token in a later HTTP Connector step's Authorization header.
Example
Secret: {{variables.partnerJwtSecret}}
Payload: {"sub": "{{trigger.body.userId}}", "role": "customer"}
Expiration Time: 1h
Algorithm: HS256
Decode JWT
Extracts a token's header and payload without verifying its signature — no secret needed, so don't use this to authenticate anything; it only inspects a token's contents. If the token string isn't a well-formed JWT at all, this step fails (throws), it does not return a structured "invalid" result — see Verify JWT below for that.
Configuring it
- JWT Token — required. The token string to decode.
- Complete Decode — default
true: returns both header and payload. Setfalseto get only the payload (and{{<stepReference>.response.data.header}}is then absent entirely, not just empty).
Reading the response
{{<stepReference>.response.data.payload}}— the decoded claims.{{<stepReference>.response.data.header}}— the decoded header (algorithm, type), present only when Complete Decode istrue.{{<stepReference>.response.data.expiresAt}}/.issuedAt}}— ISO timestamps derived from the payload'sexp/iat, present only if those claims exist.
For example, a step named "Inspect Incoming Token" (reference inspectIncomingToken) — {{inspectIncomingToken.response.data.payload.sub}}.
Example
JWT Token: {{trigger.headers.authorization}}
Complete Decode: true
Verify JWT
Verifies a token's signature and expiration against a secret. Unlike Decode JWT, a bad signature, expired token, or algorithm mismatch does not fail this step — it returns {{<stepReference>.response.data.valid}} = false with an error message, so the workflow can branch on it (e.g. with a Condition step) instead of the whole route failing.
Configuring it
- JWT Token — required. The token to verify.
- Secret — required. Must be the same secret the token was signed with.
- Allowed Algorithms — a comma-separated list, e.g.
HS256,HS384,HS512(the default — all three accepted). Narrow this to the exact algorithm you actually sign with if you want verification to reject a token signed with a different (even if nominally allowed) HMAC strength.
Reading the response
{{<stepReference>.response.data.valid}}—trueorfalse.{{<stepReference>.response.data.payload}}— the verified claims, only whenvalidistrue(nullotherwise).{{<stepReference>.response.data.header}}— the token's header, only whenvalidistrue.{{<stepReference>.response.data.expiresAt}}/.issuedAt}}— ISO timestamps, present only whenvalidistrueand the corresponding claim exists.{{<stepReference>.response.data.error}}— present only whenvalidisfalse(e.g."jwt expired","invalid signature").
For example, a step named "Verify Partner Token" (reference verifyPartnerToken) — branch a later Condition step on {{verifyPartnerToken.response.data.valid}}, and read {{verifyPartnerToken.response.data.payload.sub}} only once you know it's true.
Example
JWT Token: {{trigger.headers.authorization}}
Secret: {{variables.partnerJwtSecret}}
Allowed Algorithms: HS256
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.