Updated 7 months ago by Alex Plugaru

What is a template?

A template is a piece of text that can be inserted into any website input field (for example, text area and text inputs) with Gorgias Template.

What are templates good for?

Templates are used to avoid writing the same text over and over again. A template can be any repetitive text that you frequently write, regardless of text length.

Here are a few examples of templates:

Malala Yousafzai
Nobel Peace Prize 2014
Hello Jane,
Thanks for contacting us. Here are the steps to reset your password:

Creating your own template:

First, ensure that you have the Gorgias Templates Chrome extension installed.

  1. In your Google Chrome Browser, click the “G” icon to open the Gorgias menu
  2. Click the "New Template" button to create a template
  3. Name your template in the text box, then enter a Text shortcut (what you will type to insert the template), then enter the Template Content in the text box

  4. ../../_images/template-editor.png
  5. Click "Save Template"
  6. Go to your email webpage, create a new email, and type your Text Shortcut. Then, press the "Tab" key on your keyboard to fill the template content

Template Variables

If you address someone in your template, you can use a  template 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:

  1. Create a new template, or edit an existing template
  2. Move your cursor to where you want the variable to be inserted
  3. Click on "Insert Variable" in the Template Content toolbar
  4. Click "To: First Name" from the drop-down menu
  5. 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...

Nice Job!

List of variables

Here is the complete list of variables you can use in a template:

  • To
     field (recipient)
    • {{to.email}}
    • {{to.name}}
    • {{to.last_name}}
    • {{to.first_name}}
  • From
     field (you!)
    • {{from.email}}
    • {{from.name}}
    • {{from.last_name}}
    • {{from.first_name}}
  • CC
    • {{cc.email}}
    • {{cc.name}}
    • {{cc.last_name}}
    • {{cc.first_name}}
  • BCC
    • {{bcc.email}}
    • {{bcc.name}}
    • {{bcc.last_name}}
    • {{bcc.first_name}}
  • {{subject}} - subject content of the message
  • {{date '<amount>' '<unit>' '<format>'}} - relative date
    • A few examples with dates (list of date formats)
      • Next week: {{date '+7' 'days' "DD MMMM"}} -> 13 December
      • Last month {{date '-1' 'months' "DD MMMM YYYY"}} -> 29 November 2015
  • {{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”

Templates are powered by the Handlebars template library.

To see a complete list of possible time formats, check out Moment.js formatting here.

If the Template variable value is missing (e.g. no First Name for the contact) the variable will be replaced with an empty string.

Adding an email subject in a template

If you’re using Gorgias Templates to send emails, you can also add an email subject in a template.

  1. In the “New Template” window, click on “Configure Fields” to show the subject field. Then, type the subject.


You can tag templates to keep your templates organized. You can find more in Tags.

How did we do?