Mail Templates

Mail Templates

Mail templates are organization-owned emails built from semantic content blocks. A template stores the email content and delivery metadata, while its colors and email-compatible font are supplied by the theme selected for the preview or sending workflow.

Reusable email blocks are central blocks that can be inserted into multiple templates. Updating one reusable block updates every place where that block is used.

Core Concepts

ConceptMeaning
Mail templateOne reusable email with a name, purpose, subject, sender settings, content blocks, and variable mappings.
Local blockA block that belongs only to one mail template. Editing it does not affect other templates.
Reusable blockAn organization-owned central block referenced by one or more templates or reusable sections.
ThemeSupplies colors and an email-compatible font during preview and delivery. Theme styles are not stored in the template blocks.
VariableA dynamic value written with Handlebars syntax, for example {{firstname}}.
Variable mappingConnects a template variable to an organization input or defines an optional fallback value.

Create A Mail Template

Open the organization template overview and find the Emails section.

  1. Select Create new.
  2. Enter a clear name, for example Welcome email.
  3. Select a purpose.
  4. Open the created template.
  5. Complete the metadata, content, variable mappings, and preview.

Available purposes:

PurposeTypical use
GeneralEmails that do not belong to a more specific workflow.
WelcomeOnboarding and registration emails.
ConfirmationRegistration, booking, or action confirmations.
ReminderEvent, appointment, or deadline reminders.
CancellationCancellation notices.
UnsubscribeUnsubscribe or communication preference emails.

Purpose is used for organization and filtering. The workflow that sends an email still selects the concrete template explicitly.

Configure The Template

The editor separates the template into three areas. Each area has its own save action.

1. Metadata

FieldDescription
NameInternal name shown in template selectors and overviews.
PurposeCategory used to organize and filter templates.
SubjectSubject shown in the recipient’s inbox. Variables are supported.
Preview textOptional preheader shown by many email clients next to the subject. Variables are supported.
SenderVerified organization contact used as the sender. A sender is required before sending.
Reply-ToOptional verified address that receives replies.
Open trackingEnables or disables open tracking for deliveries using this template.

Select Save metadata after changing these values.

2. Content Blocks

Use the dashed plus areas to add blocks at the end or between existing blocks. Blocks can be reordered with drag and drop, duplicated, aligned, or removed.

BlockUse
HeadingA heading with level 1, 2, or 3.
TextText content with Markdown support.
ImageAn uploaded image or image URL with alternative text and an optional link.
ButtonA label and an absolute HTTP(S) destination URL.
DividerA visual separator supplied by the renderer and theme.
SectionA layout with one, two, or three columns.
FooterFooter content with Markdown support, for example a company address.

A section can contain headings, text, images, buttons, dividers, and footers. Sections cannot be nested inside other sections.

Select Save below the content after editing the blocks.

3. Variable Mappings

Variables can be used in the subject, preview text, text, headings, buttons, images, and footers.

Hello {{firstname}},

your registration for {{eventName}} is confirmed.

Organization, campaign, context, and system values can be resolved by the sending workflow. If a value is not supplied automatically, open Map variables and either:

  • map the variable to an organization input;
  • define a fallback value; or
  • intentionally use an empty fallback when the output should be blank.

Save the mappings separately. If a required value has neither a runtime value nor a fallback, the email is not sent.

Preview And Test Mail

The preview updates while the template is edited.

  • Select an organization theme to check the final colors and font.
  • If no theme is selected, the preview uses the built-in preview theme.
  • Enter temporary values in the preview-variable area to test dynamic content.
  • Preview values are not saved with the template.
  • The mini preview may remain empty where runtime variables are unavailable.

The fallback theme is only for previews. A real delivery must resolve a concrete organization theme. If a selected font is not supported by the email renderer, an email-safe fallback font is used.

Use Test mail to send the current editor state to one address. A valid sender, valid content, values for all required variables, and a selected organization theme are required.

Example: Welcome Email

Create a template named Welcome email with purpose Welcome.

Suggested metadata:

Subject: Welcome to Scanly, {{firstname}}
Preview text: Your registration is complete

Suggested block order:

  1. Heading: Welcome, {{firstname}}!
  2. Text: A short introduction and the next steps.
  3. Button: Open account linking to {{accountUrl}}.
  4. Reusable footer: Company name, address, and contact information.

Enter preview values such as Ada and https://example.com/account, select a theme, and send a test mail before connecting the template to a workflow.

Reusable Email Blocks

Use reusable blocks for content that should stay identical across multiple emails, for example:

  • company footers and legal information;
  • logos or standardized headers;
  • contact information;
  • support or account buttons;
  • multi-column sections used by several templates.

Create A Reusable Block From The Overview

The Email blocks section is shown above the Emails section.

  1. Select Create.
  2. Enter a unique name, for example Default company footer.
  3. Select the block type.
  4. Complete the block content.
  5. Select Create.

Reusable blocks can be searched, filtered by block type, edited, and deleted from this overview.

Save An Existing Template Block

An existing local block can also become reusable:

  1. Open a mail template.
  2. Find the block that should be reused.
  3. Select Save as email block in the block actions.
  4. Enter a unique name and save it.
  5. Save the template content.

The current block occurrence is replaced with a reference to the newly created central block.

Insert A Reusable Block

  1. Select a dashed plus area in the template editor.
  2. Switch from New block to Saved blocks.
  3. Search by name or filter by block type.
  4. Select the reusable block.
  5. Save the template content.

The picker shows up to five matching suggestions. A reusable section can only be inserted at the top level, not inside another section.

Local Versus Reusable Blocks

This distinction is important:

ActionResult
Insert New blockCreates an independent block used only by the current template.
Insert Saved blocksCreates a new placement that references the central reusable block.
Duplicate a local blockCreates an independent copy.
Duplicate a reusable blockCreates another placement of the same central block.
Edit a local blockChanges only the current template.
Edit a reusable blockChanges every template and reusable section that references it.

Update Or Delete A Reusable Block

Open Email blocks and select the block title or Edit. Before an update is applied, Scanly shows how many templates, placements, and other reusable blocks are affected. Confirming the update applies it everywhere immediately.

The block type cannot be changed during editing. Create a new reusable block if a different type is required.

A reusable block can only be deleted when it is no longer referenced by a mail template or another reusable block. Remove all placements first, save the affected templates, and then delete the block.

  1. Create central headers, footers, and legal sections as reusable blocks.
  2. Create a mail template with a clear name and purpose.
  3. Add local content and insert the required reusable blocks.
  4. Add variables and configure mappings or fallbacks.
  5. Save metadata, content, and mappings.
  6. Select a theme and review the live preview.
  7. Send a test mail.
  8. Select the template and theme in the campaign, broadcast, ticket, consent, or automation workflow that sends it.

API Overview

Mail-template endpoints are organization-scoped and require organization membership.

GET    /api/v1/organizations/:organizationId/mail-templates
POST   /api/v1/organizations/:organizationId/mail-templates
GET    /api/v1/organizations/:organizationId/mail-templates/:templateId
PATCH  /api/v1/organizations/:organizationId/mail-templates/:templateId
POST   /api/v1/organizations/:organizationId/mail-templates/:templateId/archive
DELETE /api/v1/organizations/:organizationId/mail-templates/:templateId
POST   /api/v1/organizations/:organizationId/mail-templates/preview
POST   /api/v1/organizations/:organizationId/mail-templates/test

Reusable-block endpoints:

GET    /api/v1/organizations/:organizationId/mail-blocks
GET    /api/v1/organizations/:organizationId/mail-blocks/suggestions
POST   /api/v1/organizations/:organizationId/mail-blocks
GET    /api/v1/organizations/:organizationId/mail-blocks/:mailBlockId
GET    /api/v1/organizations/:organizationId/mail-blocks/:mailBlockId/usage
PATCH  /api/v1/organizations/:organizationId/mail-blocks/:mailBlockId
DELETE /api/v1/organizations/:organizationId/mail-blocks/:mailBlockId