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.
This automation step triggers a template email to be sent to the contact.

Setting up an email step

After adding a trigger, create a new step to Send an email.Add Send Email ActionSelect a published template, then configure the subject and sender address.Send Email Action Settings
Only published templates are available to be used in an Automation.

Template variables

Use the variables field to pass dynamic data into your template. Variables reference data from the triggering event or the contact record using the event.* and contact.* namespaces.
{
  "ref": "welcome_email",
  "type": "send_email",
  "config": {
    "template_id": "044db673-fff6-420f-a566-f6aba05d60e7",
    "subject": "Your order is confirmed",
    "from": "Acme <hello@example.com>",
    "variables": {
      "firstName": "{{ event.firstName }}",
      "orderNumber": "{{ event.orderId }}",
      "total": "{{ event.amount }}",
      "company": "{{ contact.properties.company }}"
    }
  }
}
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.

Configuration

config.template_id
string
required
The ID of the email template to send.
config.subject
string
The email subject line.
config.from
string
The sender email address.
config.reply_to
string
Reply-to email address.
config.variables
object
A key-value map of template variables.
{
  "ref": "welcome_email",
  "type": "send_email",
  "config": {
    "template_id": "062f8ef4-fbfa-44f1-b5e0-ff8e1e8ffa96",
    "subject": "Welcome!",
    "from": "hello@example.com"
  }
}
  • Delays — Add time delays between emails.
  • Branching — Send different emails based on conditions.
  • Contact Delete — Remove contacts from your audience.