Skip to main content

Step Conditions

A step condition decides whether a step runs or is skipped. Same semantics on both authoring surfaces; different syntax.
Dashboard semantics: condition evaluates to true ⇒ step runs. Framework semantics: skip returns true ⇒ step is skipped. They’re mirror images — invert the boolean when porting between surfaces.

Available Variables

Use only variables that are in scope for the workflow run.
Prefer reusing existing variables for consistency. Only introduce new payload.* variables when truly needed — duplication makes templates and conditions harder to maintain.

Variable Namespaces

Subscriber Properties

Available subscriber.* properties:
  • subscriber.firstName
  • subscriber.lastName
  • subscriber.email
  • subscriber.phone
  • subscriber.avatar
  • subscriber.locale
  • subscriber.timezone
  • subscriber.subscriberId
  • subscriber.isOnline
  • subscriber.lastOnlineAt
  • subscriber.data (custom subscriber data; deeply addressable as subscriber.data.<key>)

Step Outputs

Canonical Conditions (Dashboard JSON-Logic)

Subscriber is offline

In-App was not read

In-App was not seen

Workflow tags include any of

HTTP response property equals a value

The property must be declared in the HTTP step’s responseBodySchema. Undeclared properties are not addressable.

Framework Equivalents

The same conditions in @novu/framework. Note that skip is the inverse of “run if true” — you return true to skip.

Subscriber is offline (run only if offline)

In-App was not read (send email fallback)

Branch on HTTP response

Quick Reference

Common Pitfalls

  1. Inverting the boolean wrong — Dashboard runs when condition is true; Framework skip skips when true. They’re opposites.
  2. Referencing undeclared HTTP properties — only properties in responseBodySchema are addressable in steps.<http>.<prop>.
  3. Using subscriber.isOnline == true as a stringisOnline is a boolean. Use "false" (string) only in JSON-Logic; in Framework use the JS boolean false.
  4. Conditions on a delay step — delays support skip too, but if a delay is skipped the workflow proceeds immediately. Don’t treat skip as “shorten”.

See Also