step

resend_email

Send transactional emails via the Resend API with dynamic content and attachments.

Overview

Send transactional emails via the Resend API with dynamic content and attachments.

This step provides a complete email sending solution using Resend's reliable transactional email service. Send plain text or HTML emails with full template substitution for personalizing content from event data. Supports CC/BCC recipients, reply-to addresses, custom headers, and file attachments (base64 encoded). Perfect for welcome emails, notifications, order confirmations, password resets, and any transactional email needs. The step tracks email IDs for monitoring delivery status.

Setup: 1. Create a Resend account at https://resend.com/ 2. Generate an API key in the API Keys section (https://resend.com/api-keys) 3. Verify your sending domain in the Domains section 4. Store your API key securely (e.g., as an environment variable: RESEND_API_KEY)

API Key: Required. Generate at https://resend.com/api-keys

Examples

Simple welcome email

Send a basic welcome email to new users

type: resend_email
api_key: ${env:RESEND_API_KEY}
from_email: [email protected]
to: ${user.email}
subject: Welcome to Company!
html: <h1>Welcome!</h1><p>Thanks for joining us.</p>

Personalized notification

Use template substitution for dynamic content

type: resend_email
api_key: ${env:RESEND_API_KEY}
from_email: [email protected]
to_template: ${user.email}
subject_template: "Hi ${user.first_name}, you have a new message"
html_template: |
  <h2>Hello ${user.first_name}!</h2>
  <p>You received a message from ${sender.name}:</p>
  <blockquote>${message.content}</blockquote>
  <a href="${app.url}/messages/${message.id}">View Message</a>
reply_to: ${sender.email}

Order confirmation with details

Send rich order confirmation with multiple recipients

type: resend_email
api_key: ${env:RESEND_API_KEY}
from_email: [email protected]
to_template: ${order.customer_email}
cc:
  - [email protected]
bcc:
  - [email protected]
subject_template: "Order #${order.number} Confirmed"
html_template: |
  <h1>Thanks for your order!</h1>
  <p>Order number: ${order.number}</p>
  <p>Total: $${order.total}</p>
  <p>Estimated delivery: ${order.delivery_date}</p>
reply_to: [email protected]
inject: email_result

Report with attachment

Send automated report emails with PDF attachments

type: resend_email
api_key: ${env:RESEND_API_KEY}
from_email: [email protected]
to:
  - [email protected]
  - [email protected]
subject_template: "Monthly Report - ${report.month}"
html_template: |
  <h2>Monthly Report for ${report.month}</h2>
  <p>Please find attached your monthly performance report.</p>
  <p>Key metrics:</p>
  <ul>
    <li>Revenue: $${report.revenue}</li>
    <li>New customers: ${report.new_customers}</li>
    <li>Retention: ${report.retention_rate}%</li>
  </ul>
attachments:
  - filename: report.pdf
    content: ${report.pdf_base64}

Configuration

Parameter Type Required Description
api_key string Yes Resend API key for authentication. Get yours at https://resend.com/api-keys
from_email string Yes Sender email address. Must be from a verified domain in Resend.
from_email_template string No Template with ${path.to.key} substitutions for dynamic sender email.
to string Yes Recipient email address(es). Can be a string or list of strings.
to_template string No Template with ${path.to.key} substitutions for dynamic recipient email.
subject string Yes Email subject line.
subject_template string No Template with ${path.to.key} substitutions for dynamic subject.
html string No HTML version of the email body. Ignored when 'html_template' is provided.
html_template string No Template with ${path.to.key} substitutions for dynamic HTML content.
text string No Plain text version of the email body. Ignored when 'text_template' is provided.
text_template string No Template with ${path.to.key} substitutions for dynamic plain text content.
cc string No CC recipient email address(es). Can be a string or list of strings.
bcc string No BCC recipient email address(es). Can be a string or list of strings.
reply_to string No Reply-to email address(es). Can be a string or list of strings.
tags string No List of tags for categorizing emails. Each tag is a dict with 'name' and 'value'.
drop_on_failure boolean No If True, return None on API errors instead of injecting error details.
Default: false
timeout integer No Timeout in seconds for the API request (default 10).
Default: 10
output_to string No Event key used to store the email ID or error metadata returned by Resend.
Default: "resend"
inject string No DEPRECATED: Use 'output_to' instead. Event key for storing email result.

Base Configuration

These configuration options are available on all steps:

Parameter Type Default Description
name null Optional name for this step (for documentation and debugging)
description null Optional description of what this step does
retries integer 0 Number of retry attempts (0-10)
backoff_seconds number 0 Backoff (seconds) applied between retry attempts
retry_propagate boolean false If True, raise last exception after exhausting retries; otherwise swallow.