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 trigger is the first step in every Automation. It defines which event will start the Automation when received. When your application sends an event to Resend, every active Automation with a matching trigger will execute its workflow for that contact.

How triggers work

Each run has exactly one trigger that listens for a specific event name. When you send an event with that name, Resend matches the event to all active Automations listening for it.

Event names

Event names are strings you define to represent actions in your application.
Event nameUse case
user.createdWelcome email series
payment.failedPayment recovery flow
invite.sentFeature adoption nudge
cart.abandonedAbandoned cart reminder
trial.endedTrial expiration follow-up
Event names cannot start with the resend: prefix, which is reserved for system events.

Setting up a trigger

When creating or editing an Automation, the trigger is the first node in the workflow canvas.Click the trigger node to configure it, then select the event name that will start the Automation.Add Trigger to AutomationChoose an existing event or type a new event name.Add Event Received Trigger

Identifying contacts

When sending an event to trigger an Automation, you must identify the contact using either a contact_id or an email address.
Use a contact ID when you already have the contact stored in your Audience:
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.send({
  event: 'user.created',
  contactId: '26e2b838-bf6d-4515-b6a7-17525b12b05a',
  payload: {
    plan: 'pro',
  },
});

Event payload

You can include a payload object with your event to pass data into the Automation. This data becomes available as variables in subsequent steps in the Automation using the event.* namespace.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.send({
  event: 'payment.failed',
  contactId: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  payload: {
    amount: 49.99,
    currency: 'USD',
    retryDate: '2026-11-01',
  },
});
In this example, event.amount, event.currency, and event.retryDate would be available in email templates, conditions, and other steps. View the Send Event API reference for the full endpoint specification.

Configuration

FieldTypeRequiredDescription
eventNamestringYesThe name of the event that will start the Automation.
{
  "ref": "trigger",
  "type": "trigger",
  "config": {
    "eventName": "user.created"
  }
}
View the Create Automation Steps API reference.