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 wait-until step holds the Automation until a specific event is received. Unlike a delay, which resumes after a fixed time, this step resumes when something happens in your application. Common use cases:
  • Payment — Wait for a payment to succeed before sending a receipt.
  • Adoption — Wait for a user to complete an action to unlock a feature.
  • Verification — Wait for the user to verify their email before continuing.

How it works

Add a Wait until step and configure the event to wait for.Automation Wait Until

Timeouts

When you set a timeout_seconds, the step will stop waiting after that duration. This prevents Automations from waiting indefinitely. When a wait-until step times out, it produces two possible edge types:
Edge typeWhen it’s used
event_receivedThe event arrived before the timeout
timeoutThe timeout elapsed without receiving the event
You can create different paths depending on whether the user took action within an given time period.
{
  "ref": "payment",
  "type": "wait_for_event",
  "config": {
    "event_name": "payment.completed",
    "timeout_seconds": 259200
  }
}

Filter rules

Use filter_rule to match events that meet only specific criteria. This is useful when the same event name might be sent with different payloads. For example, to wait specifically for a successful payment:
{
  "ref": "payment",
  "type": "wait_for_event",
  "config": {
    "event_name": "payment.completed",
    "filter_rule": {
      "field": "event.status",
      "operator": "eq",
      "value": "succeeded"
    }
  }
}
The filter rule supports the same operators as condition steps.

Configuration

config.event_name
string
required
The name of the event to wait for.
config.timeout_seconds
number
The maximum time to wait in seconds before timing out.
config.filter_rule
object
An optional rule object to filter incoming events.
Example
{
  "ref": "wait_for_purchase",
  "type": "wait_for_event",
  "config": {
    "event_name": "purchase.completed",
    "timeout_seconds": 86400
  }
}