# Templates, snippets and variables

Write the emails and chat messages your sequences send, reuse pieces with snippets, and fill in each lead's details with variables.

Source: https://support.rework.com/article/lead-sequence-templates

> **In plain words:** A **template** is a ready-made message, such as an email, that a sequence step sends. A **snippet** is a reusable chunk of text, like a signature or a legal footer, that you drop into many templates. A **variable** is a placeholder, such as the lead's name, that Lead fills in for each person. Read this page to write messages that read as personal and never show a blank gap. New to sequences? See [Sequences: build and publish](https://support.rework.com/article/lead-sequences-nurture).

**Where to find it:** Lead > left sidebar > **Sequences** > **Templates**. The page has two tabs at the top, **Library** (templates) and **Snippets**. **Who can use it:** Anyone who can see the lead service can create templates and snippets. Each one is **Personal** (only you) or **Team** (shared).

## The template library

Open **Templates** **(1)** in the Sequences rail. **Library** holds your templates and **Snippets** your reusable chunks **(2)**. Each card previews the message with its variables and fallbacks **(3)**, for example `{{ lead.company | default: "your team" }}`. Create a new one with **New email** or **New chat** **(4)**.

![Templates Library page with the Templates menu item, the Library and Snippets tabs, a template preview with variables and default fallbacks, and the New chat and New email buttons highlighted](https://storage.googleapis.com/reworkv3-public/success/260928/xRCXmvlsYOWYjBKv7TEKg1kbuHo0mTcASlgf0C7dMWOOS5NB7F14fKt6p8T5fIyU/img.hgRQsARyhA6p4sJbuZitHBu1kpCaqIQmgLNmp9zzh5R1KFIP49KXLt8Qa3DvIdti.png)

Use the search box (name, subject or tag) and the type filter (**All types**, **Email**, **Chat**) to find a template.

## Write an email template

1. In **Templates** > **Library**, click **New email**. The **New email template** dialog opens.
   
2. Type a **Name**. This is for your team only, so make it easy to find, such as "Webinar thank you".
   
3. Type the **Subject**. You can use variables, for example `{{ lead.name }}, a quick idea`.
   
4. Type the **Preview text**. This is the line mail apps show after the subject. If you leave it blank, Lead uses the first line of the email.
   
5. Write the **Body**. Use the **Insert variable** panel on the right side of the dialog: search it, then click a variable to add it where your cursor is.
   
6. Optional, under **Sending options**: add **CC**, **BCC** and a **Reply-to** address, and **Attachments**. Attachments can hurt deliverability, so use them sparingly.
   
7. Under **Organize & sharing**, add **Tags** and choose **Visibility**: **Personal** or **Team**.
   
8. Click **Save**. You see "Template saved".
   

![New email template dialog with Name](https://storage.googleapis.com/reworkv3-public/success/261015/dMFEgBoxPpBaQJODCK3BpaMCJBacgFBJqr9PeY19ZSlks3fTdJl7VmkBlHHIOhnV/img.eyZOaSsNMKotUVvfP7610yROwFSp6RJJv3D6CGbrJ7BvA5clG3VndWtfFIF6O7jD.png)

The template then shows in the step picker of the sequence builder. See [Sequences: build and publish](https://support.rework.com/article/lead-sequences-nurture).

### Version history

Every save keeps a copy. Once a template has more than one version, open it and look at **Version history** at the bottom. The current version is marked, and every older one has a **Restore** link. Restoring brings that text back as the current version. Sequence steps use the current version of a template.

### Chat templates

Click **New chat** for a short message template with a **Name** and a **Body**. Chat steps that start a conversation send a WhatsApp template that Meta has approved. You choose it, and the number it sends from, inside the **Chat** step of the builder.

## Snippets: reuse a chunk

A snippet is text you write once and use in many templates.

1. In **Templates**, open the **Snippets** tab and click **New snippet**.
   
2. Type a **Name**, for example "Signature - sales team".
   
3. Check the **Token**. It is the key you use to insert the snippet. The hint shows how, for example `{{snippet: sales_signature}}`.
   
4. Pick **Visibility**: **Personal - only me** or **Team - shared with everyone**.
   
5. Write the **Content**, then click **Save**. You see "Snippet saved".
   

To use it, type its token into a template body, or click the copy button on the snippet card ("Token copied") and paste it. The card also shows how many templates use it.

When you change a snippet, every template that uses it changes with it, from the next message that goes out.

## Variables

Sequence templates use variables written with **double curly braces**, like `{{ lead.name }}`. When a message is sent, Lead replaces each variable with that lead's real value.

| 
Variable

 | 

What it shows

 |
| --- | --- |
| 

`{{ lead.name }}`

 | 

The lead's name

 |
| 

`{{ lead.email }}`

 | 

The lead's email

 |
| 

`{{ lead.phone }}`

 | 

The lead's phone

 |
| 

`{{ lead.company }}`

 | 

The lead's company

 |
| 

`{{ lead.status }}`

 | 

The lead's status

 |
| 

`{{ lead.score }}`

 | 

The lead's score

 |
| 

`{{ sender.name }}`, `{{ sender.first_name }}`, `{{ sender.email }}`, `{{ sender.title }}`, `{{ sender.phone }}`

 | 

The person the email comes from, taken from the sending mailbox

 |
| 

`{{ sender.signature }}`

 | 

The sender's signature

 |
| 

`{{ unsubscribe_url }}`

 | 

The one-click unsubscribe link

 |
| 

`{{snippet: key}}`

 | 

A snippet

 |

Your own **custom fields** (extra fields your team added to the lead service) are also in the **Insert variable** list, under **Custom fields**. Use the panel so you do not have to guess how a field is spelled.

> **Tip:** Use the **Insert variable** panel instead of typing. The picker groups variables as Lead, Custom fields, Sender, System and Snippets, and inserts the exact spelling.

### Fill in a fallback with default

A variable with no value would leave a gap. Add a **default** so there is always something to read:

- `{{ lead.name | default: "there" }}` shows "there" when the lead has no name, so the email starts "Hi there".
  
- `{{ lead.company | default: "your team" }}` shows "your team" when no company is known.
  

_Example:_ Without a fallback, an email that reads "Hi {{ lead.name }}, I noticed {{ lead.company }} has been growing" becomes "Hi , I noticed has been growing" for a lead with no data. With fallbacks it reads "Hi there, I noticed your team has been growing".

An empty value with no default is replaced with nothing. Check every variable.

### The Email composer on a lead uses a different style

When you write a single email on a lead (the **Email** tab, see [Notes, emails, calls, meetings and chats](https://support.rework.com/article/lead-activities)), variables use **single curly braces** and a different spelling, such as `{lead_first_name}`. That style does not work in sequence templates, and the double-brace style does not work in the composer. Use the variable list that each screen offers so you get the right style.

## Writing templates that work

- **Keep it short.** Long automatic emails do not get read.
  
- **Personalize on something real.** "You downloaded the pricing guide" beats "Hi {{ lead.name }}".
  
- **Ask for one thing** per message.
  
- **Add a fallback** to every variable that might be empty.
  
- **Check the result.** Open the sequence's **Outbox** tab to see the message as it was rendered for a real lead.
  
- **Mind the footer.** Add `{{ unsubscribe_url }}` or a snippet that contains it, so people can see an unsubscribe link in the message. Mail apps also show their own **Unsubscribe** option.
  

## Troubleshooting

| 
Problem

 | 

Why it happens

 | 

What to do

 |
| --- | --- | --- |
| 

A variable shows as blank in the sent email

 | 

The lead has no value for it and the template has no fallback

 | 

Add \`

 | 

default: "..."\` to the variable.

 |
| 

A variable printed as `{{ ... }}` text

 | 

It was misspelled, or a custom field code was wrong

 | 

Delete it and insert it again with **Insert variable**.

 |
| 

"Body is too large"

 | 

The email body is over the size limit

 | 

Shorten it, or remove large pasted images.

 |
| 

An old composer template shows blanks

 | 

It uses the single-brace style

 | 

Rewrite it with the double-brace variables, or use it only in the composer.

 |
| 

I changed a template but old emails look the same

 | 

Sent emails are never rewritten

 | 

Only messages sent from now on use the new text.

 |
| 

My teammate cannot find my template

 | 

It is set to **Personal**

 | 

Change **Visibility** to **Team**.

 |
