Email Templates and Customization
Helmdesk uses email templates to control the content and appearance of every outgoing email — ticket confirmations, reply notifications, password resets, and transactional messages sent via the API. Templates use Handlebars syntax for dynamic content.
Template Types
Helmdesk has three types of email components:
Templates
Full email templates for specific use cases. Each template defines the subject line and body content. Examples include ticket confirmation, new reply notification, and password reset.
Layouts
Wrapper templates that define the overall email structure — header, footer, branding. A layout wraps around a template to create the final email. This lets you maintain consistent branding across all emails without duplicating HTML.
Partials
Reusable snippets that can be included in templates or layouts. Use partials for elements that appear in multiple templates, like a signature block or social media links.
How Templates Work Together
When Helmdesk sends an email, it assembles the final message in three steps:
{{{body}}} placeholder{{> partialName}} references are replaced with the partial's contentHandlebars Variables
Templates use double curly braces for variables. The available variables depend on the template type.
Ticket Templates
{{ticketSubject}} — The ticket's subject line{{ticketBody}} — The ticket's body content (HTML){{customerName}} — The customer's display name{{customerEmail}} — The customer's email address{{ticketStatus}} — Current status (open, pending, closed){{ticketPriority}} — Priority level (low, normal, high, urgent){{ticketUrl}} — Direct link to view the ticket{{projectName}} — The project name{{replyBody}} — The content of a reply (for reply notifications)Transactional Templates
{{to}} — Recipient email address{{subject}} — Email subject lineCommon Variables
{{currentYear}} — The current year (useful for copyright notices){{unsubscribeUrl}} — Unsubscribe link (when applicable)Using Triple Braces
Use triple braces {{{variable}}} when the variable contains HTML that should be rendered, not escaped. For example, {{{ticketBody}}} renders the ticket body as HTML, while {{ticketBody}} would show the raw HTML tags.
Customizing Templates
From the Dashboard
Template Editor Features
Shared Templates
Account-level templates apply across all projects in your account. Use shared templates when you want consistent email formatting across multiple projects.
To manage shared templates:
Project-level templates override shared templates with the same name. This lets you set a default at the account level and customize per project when needed.
Sending Emails via the API
Use the Helmdesk API to send transactional emails with your templates:
import Helmdesk from '@helmdesk/sdk'
const client = new Helmdesk({
apiKey: 'hd_your_api_key',
projectId: 'your-project-id'
})
// Send using a template
const result = await client.emails.send({
to: 'customer@example.com',
templateId: 'welcome-email',
variables: {
customerName: 'Jane Doe',
accountUrl: 'https://app.example.com/login'
}
})
// Send with inline content (no template)
const result = await client.emails.send({
to: 'customer@example.com',
subject: 'Your order has shipped',
html: '<p>Your order #1234 is on its way.</p>'
})
The API requires an API key with the emails:send scope.
Email Provider Configuration
Helmdesk sends emails through your configured SMTP provider. To set up email sending:
- Host — Your SMTP server (e.g., smtp.brevo.com)
- Port — Usually 587 (TLS) or 465 (SSL)
- Username — Your SMTP username
- Password — Your SMTP password or API key
- From address — The sender email address
- From name — The sender display name
Helmdesk supports any SMTP provider: Brevo, SendGrid, Postmark, Amazon SES, Mailgun, or your own mail server.
Best Practices
Template Import and Export
You can import and export templates via the API:
// Get template schema (for migration)
const schema = await client.emails.getTemplateSchema()
// Import templates from another system
await client.emails.importTemplates({
templates: [
{
name: 'welcome',
subject: 'Welcome to {{projectName}}',
body: '<h1>Welcome, {{customerName}}</h1>...',
type: 'template'
}
]
})
This is useful for migrating from another helpdesk platform or synchronizing templates across environments.
Was this article helpful?