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:
step1
Create a new template, or edit an existing template.
step2
Move your cursor to where you want the variable to be inserted.
step3
Click on "Insert Variable" in the Template Content toolbar.
step4
Click "To: First Name" from the drop-down menu.
step5
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.
{{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 Tinyjunko 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.{{moment}}
- Dynamic date and time. See more details about date formatting.
Templates variables are powered by the Handlebars (opens in a new tab) 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 Jan 13, 2023.
What you can insert | Variable and preview |
---|---|
Today's full date | {{moment format="ll"}} Preview: Jan 13, 2023 |
Custom date format | {{moment format="YYYY MMM"}} Preview: 2023 Jan See all possible formatting values. (opens in a new tab) |
Current time (24h) | {{moment format="HH:mm:ss"}} Preview: 13:00:00 |
Current time (12h) | {{moment format="hh:mm:ss"}} Preview: 1:00:00 PM |
7 days from today | {{moment add="days" amount="7" format="ll"}} Preview: Jan 20, 2023 |
7 days before today | {{moment subtract="days" amount="7" format="ll"}} Preview: Jan 6, 2023 |
Next day of the week | {{moment add="days" amount="1" format="dddd"}} Preview: Saturday |
Previous day of the week | {{moment subtract="days" amount="1" format="dddd"}} Preview: Thursday |
End of the week | {{moment endOf="week" format="ll"}} Preview: Jan 14, 2023 |
Time from now to a different date | {{moment d "to" "2022-11-05"}} Preview: 9 days ago |
Time to now from a different date | {{moment d "from" "2022-11-25"}} Preview: in 9 days |
Days in the current month | {{moment d "daysinmonth"}} Preview: 31 |
Today's date in a different language | {{moment lang="fr" format="ll"}} Preview: 13 janv. 2023 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" lang="fr"}}
. This will output vendredi.
Supported languages for dates
- 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)