How to use variables in message templates


Variables are placeholder text in message templates or signatures that are dynamically filled based on the context. They can also appear in URLs in these message templates or in signatures. When you set up a message template with variables and use the message templates in a reply, Front will automatically scan and pull from the saved contact details of your recipient. 

Variable options

Default variables

Front has default variables that will populate from the fields of your saved Contacts. To use a variable, simply type two double curly brackets {{ when composing a new message template or signature. The list of variables will appear, and you can select the one you'd like to use.

The current list of default variables are:

  • numeric version of the conversation's id
  • conversation.public_id: id available in app menus (eg. cnv_123abc)
  • numeric version of the message's id
  • message.public_id: id available in app menus (eg. cnv_123abc)
  • recipient.handle: contact's handle (ie. email, phone, etc.) dependent on message type
  • contact's email address
  • recipient.twitter: contact's Twitter handle
  • contact's phone number
  • contact's full name
  • recipient.first_name: first part of contact's name, split on the first space
  • recipient.last_name: remaining portion of contact's name following the first space
  • contact's link attribute
  • current Front user's numeric id
  • current Front user's full name (first + last)
  • user.first_name: current Front user's first name
  • user.last_name: current Front user's last name
  • current Front user's email

Custom variables

Front's Contact Manager allows you to add your own custom fields for your contacts, such as a customer ID or a job title, and you can use these fields in custom variables for your message templates. If you do have custom contact fields, then typing the two double curly brackets {{ in the message templates composer will also pull up any custom options you have created in your Contacts. 


What if the contact or field doesn't exist?

If the recipient name does not exist in your Contacts, the variable will not populate in your message template, in which case you should define a fallback. When defining a fallback, make sure you surround it with single quotes:

        {{recipient.first_name | 'there'}}

Do variables work with automatic replies?

If you are using message templates in rules to send automatic replies, the {{user...}} variables, which is the Front teammate sending the message, will be blank because no user is actually tied to the reply, as it is automatic.

Do variables work in the subject line?

When you insert a message template manually in your message, the variable will work in the body, but not in the subject if you have one set up in the subject.

However, when a rule automatically sends a message template with a variable in the subject line, the variable will work in the subject.

Do recipient variables work for multiple recipients?

If you have multiple recipients you're writing to, dynamic variables will only populate the first recipient in the list, rather than separate copies to each recipient with their name populated. If you need to send separate copies with unique variables for each recipient, you should use Sequences.

50replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Can you have custom variables? I.E. when I create custom fields in Pipedrive and I have Pipedrive integrated with Front can I pull in the custom fields associated with my contacts when emailing from front?

    Like 3
  • Hi silopakcirb,

    Currently we do not support custom variables. Sorry!

  • Cori Morris I would also love that feature.

    Like 4
  • Cori Morris Custom variables would be awesome. We have a number email templates that require manually pasting in things, like order confirmation numbers. If our database could be linked to Front, and we could pull in fields from our own records, we could save a ton of time.

    Like 7
  • Cori Morris Is it possible to put text on the left side of the pipe? For example:

    If the recipient is a contact:

    Hi Cori,



    Unfortunately, I expect that:

    Hi {{recipient.first_name | ''}},

    would get me:

    Hi ,

    Thank you.

  • Geoff Ball Hi! Unfortunately this isn't possible right now. Sorry!

  • If I understand correctly, this isn't possible yet, but please add my vote to the pool.

    Here is the request as a user story: I'm adding an autoresponder for advanced customer service requests (I.E. you've just asked a question that to properly answer it is going to cost you an hour (or some chunk thereof) of a sales engineer's time and we are not willing to give that to you for free in the hopes that you're going to accept our quote.) We charge $150 per hour for this sales engineering service in increments of 10 minutes. Before I know how many minutes it's going to take I have to read the email and give a low expected range and a high expected range. In a sample case I'm guessing 30-60 minutes. When I open the canned response I want a subset of options and variables. I.E. lowVal = 3 highVal = 6 and a checklist of reasons |Multiple Quotes| Multiple Locations| Risk Factors [x,y,z].


    Dear John Doe,

    We charge $150 per hour in 10 minute increments for sales engineering support. At this complexity you can expect it will cost you between $75 and $150 as it will take 30 to 60 minutes to finish turning this conversation into a precise quote. The underlying factors to this being more complex than normal are: You're asking for multiple materials that cut in different kinds of shops. You're asking for variations on your vector art which significantly change the scope of the project and the types of machines which can fabricate this. You're asking for post fabrication finishing work which means this one job has to be done by two different shops which adds both risk and cost to the job. 


    Your favorite source for Fabrication

    At the very least it would be nice if we could just see highlighted areas where the values could be typed into the email and not allow anyone on our customer service team to hit send without typing in a value or deleting the section. 

  • Hi Marc,

    That is correct. This is not possible right now. I will share your request with our product team.

  • Any way to add "Link" as a custom variable? 

  • Chris Hutchins Hi there, 

    Not right now. Where are you wanting it to come from?

  • Cori Morris from the link field for a contact.

  • Chris Hutchins Oh, ok. I see! I will share this with our product team as a feature request. 

  • Hi there,


    Is it possible to use a varible when I'm sending an e-mail to a group of contacts, or a list?

    Example, I like to send an specif offer to a group of contacts but I'd like to use {{ recipiente.first_name}} and for each contact it add his own name.


    Best Regards

  • Guilherme Valdemarin Hi there,

    The best way to accomplish this is with our Sequences feature. That's our version of mail merge.

    Hope that helps!

  • Could you tell me if there is a way to force mixed case on a variable. For example, if a person's email address is regan smith and I use {{recipient.fit_name}} my email shows up as "Hi regan,". Is there a way to force the variable to capitalize the first letter ("Hi Regan,")?



  • Joe Force Unfortunately this is not currently possible

  • can be used in both the body and the subject

    Is this accurate? I was able to add a variable to the body (cool feature), but I'm trying to add a variable in the subject line and the variable list is not popping up when I type {{.  I tried typing the full variable anyway, saved the response, tested it and the variable populated within the body, but the area in the subject where I entered the variable code remained blank (and the variable code that I had typed was gone). 

  • Are we able to add other variables like {{city}} or {{streetaddress}}? If so how?

  • Is it possible to use multiple variables of the same type?  For example: Each recipient's name filled in when there is more than one recipient?  It may also helpful to have the ability to define whether variables get used based on if the information is sourced from the To: line, CC: line, or BCC: line.

  • Joe Hemsing Thanks for testing it. You are correct! Variables only work in the body, but not the subject line. We'll be sure to update that in the article.

  • Joe Hemsing You can utilize sequences to personalize and send mass emails (using dynamic variables to multiple recipients). You can learn how to do that here. Unfortunately, we do not have the ability to define whether variables get used based on the information it is sourced from.

    Like 1
  • Ben Leon The only way to do this is by using sequences. The dynamic variables like "city" or "streetaddress" can only be pulled if you have the data for "city" or "streetaddress" in a column name in your csv file of contacts. 

  • Lemuel Chan thank you.  I may have been unclear in what I meant. I meant if I am sending 1 email to two recipients (Nick and Eric, for example), I would like the ability to have both names inserted:  

    “Dear [Nick] and [Eric],”

    ... or if there are multiple recipients, perhaps replace the variable with something universal, like “Dear [Team],”

  • Joe Hemsing Actually, if you would like to use dynamic variables in the subject line, you have to define that in the specific canned response under "Subject". Composing a message and inserting a variable like "{{}}" in the subject line will not work. 

  • Joe Hemsing Sorry, that is not a capability we have with dynamic variables.

Like8 Follow
  • 5 mths agoLast active
  • 50Replies
  • 29396Views
  • 29 Following