Transactional Emails
Transactional emails are triggered programmatically for individual users—order confirmations, password resets, account notifications, and other time-sensitive communications.Transactional vs Marketing
| Transactional | Marketing |
|---|---|
| Triggered by user action | Sent to segments |
| One recipient at a time | Multiple recipients |
| Time-sensitive | Can be scheduled |
| Expected by user | Promotional |
| Higher deliverability | May be filtered |
- Order confirmation
- Shipping notification
- Password reset
- Account verification
- Payment receipt
- Security alert
Sending Modes
1. Template Mode (Recommended)
Create reusable templates in the dashboard, send via API using the template slug.- Non-developers can edit templates
- Consistent branding
- Version control in dashboard
- Analytics per template
- Template blocks can include conditional display rules based on recipient variables
- Repeat blocks can render one child block set per item in an array variable
Dynamic Array Data
Transactional templates can repeat blocks over arrays passed invariables.
For example, a repeat block with source items and item alias item
renders its child blocks once per item. Inside those children, use scoped merge
tags like {{item.title}}, {{item.description}}, and {{item.number}}.
2. Direct Mode
Send email content directly without a pre-created template.- Dynamic content generated by your app
- One-off emails that don’t need templates
- Testing and development
- React Email templates (see below)
3. React Email Mode
Build type-safe, responsive email templates using React Email components and render them to HTML.- Type-safe templates with TypeScript
- Reusable components
- Responsive design built-in
- Preview emails during development
4. SMTP Template Payloads
If another product can send through SMTP but lets you control the message body, you can point it at Sequenzy SMTP and send a JSON payload that references one of your existing transactional emails. This is useful for products such as Supabase Auth, where Supabase still triggers the email but Sequenzy renders and sends the final template. Requirements:- A Sequenzy API key for SMTP authentication
- At least one sender profile on a verified sending domain
- A transactional email with a sender profile assigned
transactionalId instead of slug. If Sequenzy receives a JSON body in this format over SMTP, it ignores the raw email subject/body and sends the saved transactional template instead.
For the full Supabase setup, including variable mapping, see the Supabase integration guide.
Creating Templates
In the Dashboard
- Go to Transactional in your dashboard
- Click Create Template
- Enter a slug (URL-friendly identifier)
- Design your email with the visual editor
- Add variable placeholders where needed
- Save and activate
Template Slugs
Slugs are unique identifiers for your templates:Slugs are auto-generated from the template name but can be customized. They
cannot be changed after creation.
Variables
Variables let you personalize transactional emails.Syntax
With Defaults
Provide fallback values for missing variables:FIRST_NAME or firstName is empty, “Customer” is used.
Conditional HTML Sections
Use{{#if variable}}, {{else}}, and {{/if}} to render simple conditional
sections in raw HTML. This is most useful with subscriber custom attributes:
{{#unless variable}}...{{/unless}} is also supported. Conditions check
whether the resolved variable is present and truthy. Nested if/unless
sections are supported, but helpers, comparisons, loops, and arbitrary
Handlebars expressions are not.
System Variables
These variables are resolved at send time:| Variable | Source |
|---|---|
{{EMAIL}} | Recipient email address |
{{FIRST_NAME}} | firstName, first_name, or FIRST_NAME from request variables |
{{LAST_NAME}} | lastName, last_name, or LAST_NAME from request variables |
{{NAME}} | name, NAME, fullName, or a full name built from FIRST_NAME and LAST_NAME variables |
For REST API sends, pass name values in
variables when you want to use them.
Saved subscriber names are not automatically backfilled into FIRST_NAME,
LAST_NAME, or NAME.Custom Attributes
Any subscriber custom attributes are available:Passed Variables
Variables passed in the API request:API Reference
Send Email
List Templates
Get Template Details
Auto-Creation
When you send to an email that doesn’t exist:- A new subscriber is created automatically
- Status is set to
active - Custom attributes from
variablesare saved (if applicable)
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
Template not found | Invalid slug | Check slug spelling |
Template disabled | Template is deactivated | Enable in dashboard |
Missing required fields | No to, slug/subject | Include required fields |
Missing variables | Template has unfilled variables | Pass all required variables |
No sender configured | No sender profile | Set up sender in dashboard |
Sending paused | Account sending is paused | Check sending status |
Response Codes
| Code | Description |
|---|---|
200 | Email queued successfully |
400 | Validation error |
401 | Invalid API key |
404 | Template not found |
500 | Server error |
Best Practices
1. Use Templates
Templates are easier to maintain and update:2. Handle Variables Gracefully
Always provide defaults for optional variables, or guard larger optional sections with conditionals:if, unless, and else. They do not support
comparisons or custom helpers.
3. Log Job IDs
Save the returned job ID for debugging:4. Use Meaningful Slugs
5. Test in Development
Use test emails before production:Integration Examples
Order Confirmation
Password Reset
Welcome Email
Related
API Reference
Full API documentation
Subscribers
Auto-creation and attributes
Campaigns
Broadcast marketing emails
Sequences
Automated email workflows