Design polished, reusable HTML emails without leaving LaunchSMS. The Email Builder pairs a drag‑and‑drop Unlayer editor with LaunchSMS merge tags so every automation step can send on‑brand content.
Access & Purpose
- Make sure your plan includes the LaunchSMS Email Builder.
- Email templates live at
/email-templateswhere teams can create, edit, preview, and delete designs. Saved templates appear inside the Automation builder’s Send a Templated Email action and expose apreview_urlso authors can verify content without leaving the flow. - Each template stores both the raw Unlayer design JSON (
design) and the rendered HTML (html) in theemail_templatestable via. HTML is what gets delivered downstream; the design JSON reloads the editor for future tweaks.
Template Lifecycle
- Index & Pagination –
/email-templateslists templates with name, subject, updated timestamp, andView/Edit/Deleteactions. Pagination keeps the list manageable. - Create/Edit – Authors always see the same workflow: set internal name + subject, work in the Unlayer canvas, then save.
- Preview –
/email-templates/{id}renders a static preview card with the stored HTML./email-templates/{id}/previewreturns raw HTML, which the automation builder opens inside a modal when someone clicks “Preview template.” - Delete – Removing a template via the index view immediately hides it from automations. Encourage teams to deactivate dependent automations or swap templates before deletion to avoid broken steps.
Building with the Editor
Inside the form partial you’ll find:
- Starter Template Buttons – Quick‑start chips load bundled JSON files from starter templates or a blank canvas.
- Template Gallery – “Browse robust templates” opens a modal with every starter template’s preview image, description, and tag. Selecting one loads its design JSON into Unlayer.
- Merge Tags – The script registers grouped merge tags with Unlayer: Contact & Company, Membership & Warranty, Scheduling, ServiceTitan, Housecall Pro, Angi, HomeAdvisor, and Jobber. Authors can drop tokens like
@{{contact_name}}or@{{jobber_summary}}directly in text blocks. - Exports – “Download JSON/HTML” buttons dump the current design or compiled HTML using the template name as the filename. Handy for sharing with external reviewers or keeping backups.
- Dark Mode Awareness – The email builder listens for the dashboard’s dark mode toggle and tells Unlayer to switch themes accordingly, so the editing chrome matches the app.
Merge Tag Reference
Authors don’t need to memorize every payload key—the dropdown exposes them—but the main categories are:
- Contact & Company –
@{{contact_name}},@{{company_name}},@{{company_phone}},@{{company_sms}},@{{company_address}},@{{review_link}},@{{form_name}}. - Membership & Warranty –
@{{membership_name}},@{{membership_status}},@{{membership_end_at}},@{{equipment_name}},@{{warranty_end_at}},@{{warranty_type}}. - Scheduling –
@{{technician_name}},@{{arrival_window_start}},@{{arrival_window_end}}. - Integration Payloads – ServiceTitan invoice summaries plus the full Housecall Pro, Angi, HomeAdvisor, and Jobber field sets (job tags, balances, appointment windows, lead sources, etc.).
Using Templates in Automations
- Any active automation can add a Send a Templated Email step. The dropdown is populated with templates owned by the company.
- The action lets you pick a template, optionally override subject/body per step, and preview the template via the
/previewroute before saving. - During execution the job:
- Ensures the contact has an email address and is not unsubscribed (
EmailUnsubscribe::isUnsubscribed). - Resolves merge tags and inserts unsubscribe text if missing.
- Injects tracking pixels plus rewrite URLs (for Automation Goals reporting and Email Analytics).
- Ensures the contact has an email address and is not unsubscribed (
Data Model & Storage
| Column | Purpose |
|---|---|
user_id |
Company ID (from Auth::user()->company_id fallback). |
name |
Internal label displayed across the UI. |
subject |
Default subject line; automations can override it per step if desired. |
design |
JSON blob from Unlayer. Cast to array in EmailTemplate so PHP can manipulate it. |
html |
Fully rendered email ready for sending and previewing. |
EmailTemplateController::store/update validate that name, subject, design, and html are present, preventing half‑baked templates from saving.
Best Practices
- Name & Subject Conventions – Include audience + intent (
HVAC Welcome – Spring 2025). It helps automation authors pick the right template. - Version Before Editing – Use the download buttons to export JSON prior to major edits. You can re‑import via Unlayer if you need to revert.
- Test Merge Tags – Use the Automation builder’s preview or send yourself a test automation to verify tokens resolve. Empty merge tags result in blank strings, so consider defaulting copy (“Hey there”) where possible.
- Respect Compliance – Even though the send job appends an unsubscribe footer, linking to your own preference center higher in the email improves deliverability and transparency.
- Monitor Email Analytics –
/analytics/emaillets you filter by automation/template to see opens and clicks. Use those insights before tweaking designs.
With this workflow, teams can build an email library once and reuse it everywhere—from nurture sequences to transactional updates—while keeping branding consistent and compliant. Document merge tags, keep exports handy, and review analytics regularly to keep the library trustworthy.