1. Help
  2. Reminders & Notifications
  3. Advanced email templates

Advanced email templates

Note: This is an advanced article!

Advanced customers can take greater control over the email templates in Content Snare.

We use Liquid templates.

This makes it simple to add conditional content to your emails, for example:

{% if request.name contains "Website" %}
  This will be displayed only if the request name contains the word "Website"
{% endif %}

To learn how conditionals work in Liquid, read this documentation. You can see what operators you can use here.

The Truthy rules can be used to create a condition like this, that will only display if a PIN code exists on the request.

{%- if request.share_passcode -%}  
The passcode required to access the link: {{request.share_passcode}}   {%- endif -%}

Note: This block has a hyphen in the tag, like {%- and -%}. This ensure that no extra whitespace, like a paragraph is added.

Here’s another example that would display the text only if the client has completed less than 20% of their request.

{% assign percent = request.completion_percentage | ceil %}
{% if percent_number < 20 %}
  This will be displayed only if the request is less than 20% complete
{% else %}
  20% complete or more
{% endif %}

In this example, our completion percentage variable is text that includes the percentage sign (e.g. 25%) – the “ceil” filter converts this to a number so we can use it with the < operator.

Liquid Variables & Objects

When writing your templates, here is a list of the objects & variables available to you.

Note, some of the below contain filters, which change the output of each variable. For example, the lines where you can see “img_tag” convert the image URL into a HTML image tag.

All of these are text types.

Current Datenow | date
Your Company Namecompany.name
Your Company Contactcompany.contact
Your Company Imagecompany.image | img_tag
Your Company Image URLcompany.image
Request Owner Full Nameowner.contact
Request Owner First Nameowner.contact_first_name
Request Owner Last Nameowner.contact_last_name
Request Owner Emailowner.email
Request Owner Imageowner.image | img_tag
Request Owner URLowner.image
Request % Completed (includes % sign)request.completion_percentage
Request Days Remainingrequest.days_remaining
Client Company Nameclient.company_name
Client Contact Full Nameclient.contact
Client Contact First Nameclient.contact_first_name
Client Contact Last Nameclient.contact_last_name
Client Emailclient.email
Client Imageclient.image | img_tag
Client Image URLclient.image
Folder Namefolder.name
Request Namerequest.name
Request Link URLrequest.link | link_to: request.link
Request Link ButtonClick here to access | button_to: request.link
Request Share Pin Coderequest.share_passcode
Request Due Daterequest.due_date
Client Password Reset Linkrequest.password_update_link | link_to: request.password_update_link

Plus these boolean values:

Request is shared by link (no login needed)request.is_shared
Request requires login and client has not accepted invitationrequest.requires_activation
Updated on March 25, 2024

Was this article helpful?

Related Articles