Skip to main content
This automation step triggers a Template email to be sent to the contact.

How it works

After adding a trigger, create a new step to Send an email.Add Send Email ActionSelect a published template, then configure the sender address.Send Email Action Sender SettingsOptionally, select a Topic to skip this step for contacts who opted out of it.The subject always comes from the Template. To send a different subject, set subject when creating the step via the API.
Only published templates are available to be used in an Automation.

Template variables

Use the variables field to pass data into your template. Each value is a static string, passed as-is, or a reference with { "var": "<path>" }:
  • event.* is a field from the event that triggered the Automation, such as event.firstName.
  • contact.* is a field from the contact, such as contact.properties.company.
  • wait_events.<event_name>.* is a field from an event a previous wait for event step received, such as wait_events.feedback.received.response. If the Automation waited for that event more than once, this is the most recent one before this step.
Template variables must be present in your referenced template and the key names must match exactly with the template variable names. For more help working with variables, see the Template documentation.

Send with a Topic

Set topic_id to send the email only to contacts subscribed to a Topic. This lets contacts opt out of one kind of Automation email, like product tips, while still receiving others.
When the step runs, Resend checks the contact’s subscription to the Topic:
  • Opted in: the email is sent.
  • Opted out: the step is skipped and no email is sent. The Automation continues to the next step.
  • No preference: the Topic’s default subscription decides. The email is sent if the default is opt_in, and the step is skipped if it’s opt_out.
The Topic must exist in your team. If it doesn’t, the API rejects the request with a 422 error.
If you delete a Topic that a send_email step uses, the step keeps the deleted Topic’s ID and fails every time it runs. Pick another Topic for the step or remove it before deleting the Topic.

Unsubscribe behavior

Resend does not automatically add an unsubscribe link to emails sent from a send_email step. To let contacts opt out, add {{{RESEND_UNSUBSCRIBE_URL}}} to the Template used by the step.
{{{RESEND_UNSUBSCRIBE_URL}}} must be added to the Template itself, not the step’s config. If the Template doesn’t include this variable, contacts have no way to unsubscribe from within the email.
When the Template includes {{{RESEND_UNSUBSCRIBE_URL}}}, Resend handles unsubscribes as follows, with or without a Topic:
  • Global unsubscribe always wins. A contact who is unsubscribed never receives Automation emails, even if they have opted in to the step’s Topic.
  • The unsubscribe link opens your preference page. It works the same as the Broadcast unsubscribe link.
  • One-click unsubscribe is global. Resend also adds List-Unsubscribe and List-Unsubscribe-Post headers, which inbox providers like Gmail show as an unsubscribe button. Using that button unsubscribes the contact from all Broadcasts and Automation emails, not only the step’s Topic.
See when to use an unsubscribe link to decide whether your Automation emails need one.

Configuration

object
required
The published template to send. Provide id and optionally variables.
string
The sender email address.If provided, this value will override the template’s default value.
string
The email subject line.If provided, this value will override the template’s default value.
string
Reply-to email address.If provided, this value will override the template’s default value.
string
The ID of the Topic this email belongs to. Contacts not subscribed to the Topic skip this step. See Send with a Topic.