Template Variables
Variables are dynamic pieces of information, such as your name or today's date, that you can insert with templates.
How to use variables
If you address someone in your template, you can use a variable to avoid changing the recipient’s name every time you insert the template.
For example, if you want to address the correct recipient in your template, your template content would look like this:
Hello ________,
And then the rest of the template follows here...
You can use a template variable for the recipient's first name:
- Create a new template, or edit an existing template.
- Move your cursor to where you want the variable to be inserted.
- Click on "Insert Variable" in the Template Content toolbar.
- Click "To: First Name" from the drop-down menu.
- Your template should look like this:
Hello {{to.first_name}},
And then the rest of the template follows here...
By using this template, if you are writing to Jane Doe, the template content will display:
Hello Jane,
And then the rest of the template follows here...
List of available variables
Here is the complete list of variables you can use in a template:
To field - Recipient. Who you're sending the email to.
{{to.email}}
{{to.name}}
{{to.last_name}}
{{to.first_name}}
From field - Your personal details from Gmail, Outlook, LinkedIn, etc.
{{from.email}}
{{from.name}}
{{from.last_name}}
{{from.first_name}}
CC field.
{{cc.email}}
{{cc.name}}
{{cc.last_name}}
{{cc.first_name}}
BCC field.
{{bcc.email}}
{{bcc.name}}
{{bcc.last_name}}
{{bcc.first_name}}
Account - Your Briskine account details (from Settings > My Account).
{{account.email}}
{{account.name}}
{{account.last_name}}
{{account.first_name}}
{{subject}}
- subject content of the message.{{choice 'hello, hi, hey'}}
- a random choice.{{domain to.email}}
- Extract domain name from an email. For example, if the recipient is contact@AWESOME-sweet-bakery.com, this variable will print “Awesome Sweet Bakery”.{{moment}}
- Dynamic date and time. See more details about date formatting.
Templates variables are powered by the Handlebars template library.
If the Template variable value is missing (e.g. no First Name for the contact) the variable will be replaced with an empty string.
Date and time variables
Use the {{moment}}
variable for powerfull date and time formatting.
For these examples, we'll consider today's date to be 1 July 2020.
What you can insert | Variable and preview |
---|---|
Today's full date | {{moment}} Preview: July 1 2020 |
Custom date format | {{moment format="YYYY MMM"}} Preview: 2020 Jul See all possible formatting values. |
Current time (24h) | {{moment format="HH:mm:ss"}} Preview: 13:00:00 |
Current time (12h) | {{moment format="hh:mm:ss A"}} Preview: 1:00:00 PM |
7 days from today | {{moment add="7;days"}} Preview: July 8 2020 |
7 days before today | {{moment subtract="7;days"}} Preview: June 24 2020 |
Next day of the week | {{moment add="1;days" format="dddd"}} Preview: Thursday |
Previous day of the week | {{moment subtract="1;days" format="dddd"}} Preview: Tuesday |
End of the week | {{moment endOf="week"}} Preview: July 04 2020 |
Time from now to a different date | {{moment "2020-07-10" fromNow=true}} Preview: 9 days |
Time to now from a different date | {{moment "2020-07-10" toNow=""}} Preview: 9 days ago |
Days in the current month | {{moment daysInMonth=true}} Preview: 31 |
Today's date in a different language | {{moment locale="fr"}} Preview: juillet 1 2020 See the list of supported locales. |
You can combine different options to get the date you need. For example, to get only the day the week, 3 days from now, in French, you can use {{moment add="3;days" format="dddd" locale="fr"}}
. This will output samedi.
Supported languages for dates
The moment
variable supports the following language codes:
- af (Afrikaans)
- ar-dz (Arabic - Algeria)
- ar-ly (Arabic - Libya)
- ar-ma (Arabic - Morocco)
- ar-sa (Arabic - Saudi Arabia)
- ar-tn (Arabic - Tunisia)
- ar (Arabic)
- az (Azeri)
- be (Belarusian)
- bg (Bulgarian)
- bn (Bengali)
- bo (Tibetan)
- bs (Bosnian)
- ca (Catalan)
- cs (Czech)
- cy (Welsh)
- da (Danish)
- de-at (German - Austria)
- de-ch (German - Switzerland)
- de (German)
- el (Greek)
- en-au (English - Australia)
- en-ca (English - Canada)
- en-gb (English - Great Britain)
- en-ie (English - Ireland)
- en-nz (English - New Zealand)
- en-us (English - United States)
- es-do (Spanish - Dominican Republic)
- es (Spanish)
- eu (Basque)
- fa (Farsi - Persian)
- fi (Finnish)
- fo (Faroese)
- fr-ca (French - Canada)
- fr-ch (French - Switzerland)
- fr (French)
- gd (Gaelic)
- he (Hebrew)
- hi (Hindi)
- hr (Croatian)
- hu (Hungarian)
- hy-am (Armenian)
- id (Indonesian)
- is (Icelandic)
- it (Italian)
- ja (Japanese)
- ka (Georgian)
- kk (Kazakh)
- km (Khmer)
- kn (Kannada)
- ko (Korean)
- lo (Lao)
- lt (Lithuanian)
- lv (Latvian)
- mk (Maori)
- ml (Malayalam)
- mr (Marathi)
- ms-my (Malay - Malaysia)
- ms (Malay)
- my (Burmese)
- nb (Norwegian)
- ne (Nepali)
- nl-be (Dutch - Belgium)
- nl (Dutch)
- pa-in (Punjabi)
- pl (Polish)
- pt-br (Portuguese - Brazil)
- pt (Portuguese)
- ro (Romanian)
- ru (Russian)
- sd (Sindhi)
- sk (Slovak)
- sl (Slovenian)
- sq (Albanian)
- sr-cyrl (Serbian - Cyrillic)
- sr (Serbian)
- sv (Swedish)
- sw (Swahili)
- ta (Tamil)
- te (Telugu)
- th (Thai)
- ttl-phh
- tr (Turkish)
- uk (Ukrainian)
- ur (Urdu)
- uz-latn
- uz (Uzbek)
- vi (Vietnamese)
- yo (Yoruba)
- zh-cn (Chinese - Simplified)
- zh-hk (Chinese - Hong Kong)
- zh-tw (Chinese - Taiwan)