Skip to main content
Automations are currently in private alpha and only available to a limited number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:
npm install resend@6.10.0-preview-workflows.3
Contact us if you’re interested in testing this feature.
A branch step evaluates a condition against event or contact data and routes the Automation down one of two paths: condition met or condition not met. Common use cases:
  • Plan-based emails — Send different content to free vs. paid users.
  • Engagement splits — Take different actions based on user activity.
  • Personalization — Tailor follow-ups based on event payload values.

How it works

Add a True/false branch action and configure the condition using the editor.Automation Branch

Configuration

config.type
string
required
The type of condition node. Possible values:
  • rule
  • and
  • or
For rule type:
config.field
string
required
The field to evaluate. Must use the event. or contact. namespace prefix (e.g., event.amount, contact.email).
config.operator
string
required
The comparison operator. Possible values:
  • eq: equals
  • neq: not equals
  • gt: greater than
  • gte: greater than or equal to
  • lt: less than
  • lte: less than or equal to
  • contains: contains a given value
  • starts_with: starts with a given value
  • ends_with: ends with a given value
  • exists: field exists
  • is_empty: field is empty
config.value
string | number | boolean | null
The value to compare against. Not required for exists and is_empty operators.
For and / or types:
config.rules
object[]
required
An array of nested condition config objects. Must contain at least one item.
Single rule example:
{
  "ref": "check_plan",
  "type": "condition",
  "config": {
    "type": "rule",
    "field": "event.plan",
    "operator": "eq",
    "value": "pro"
  }
}
Use and or or to combine multiple rules into a single branch:
{
  "ref": "check_plan_and_amount",
  "type": "condition",
  "config": {
    "type": "and",
    "rules": [
      {
        "type": "rule",
        "field": "event.plan",
        "operator": "eq",
        "value": "pro"
      },
      {
        "type": "rule",
        "field": "event.amount",
        "operator": "gte",
        "value": 100
      }
    ]
  }
}

Edges

A condition step always produces two outgoing edges.
Edge typeDescription
condition_metTaken when the condition evaluates to true
condition_not_metTaken when the condition evaluates to false
{
  "from": "check_plan",
  "to": "send_pro_email",
  "edge_type": "condition_met"
},
{
  "from": "check_plan",
  "to": "send_free_email",
  "edge_type": "condition_not_met"
}