How to Use Liquid in Xink Email Signatures

Use Liquid in Xink email signatures for dynamic content, conditional logic, formatted phone numbers, hidden blank fields, or campaign content that changes based on employee data.

Short answer

Liquid lets you control what appears in an email signature by using objects, tags, and filters. Objects display employee data, tags add conditions or logic, and filters change the format of field values. To use Liquid in Xink, add @liquid at the very top of the signature source code, then add your Liquid code below it.

When should you use Liquid?

Use Liquid when standard fields or campaign rules are not enough. Liquid is useful when you want to:

  • Hide empty fields from an email signature.
  • Format phone numbers consistently.
  • Show different content based on country, office, department, or other employee fields.
  • Display campaigns for specific employee groups.
  • Combine multiple conditions in one signature template.

Liquid basics in Xink

Liquid in Xink is built around three main dropdown sections:

  • Objects display employee data, such as email, phone, name, or shared fields.
  • Tags control logic, such as if, unless, case/when, for, assign, and capture.
  • Filters change output formatting, such as trimming text, changing case, replacing text, or formatting phone numbers.

Liquid is a template language that makes it easier to create Xink email signatures and campaigns with dynamic content, conditional logic, and consistent data formatting.

Liquid supports built-in tags, objects, and filters. You can combine them, nest conditions, and format employee data directly in the signature template. This helps you control how each employee’s signature appears without changing the original data synced from Active Directory, Microsoft Entra ID, Google Workspace, or another source.

Example#1

You synced the phone number from your AD into Xink in this format +1 9083408836 / +1 9083408836x123 and your task is to make it render in the signature of the end-user this way:

  1. show the number in this format 908 340 8836 and if it has an extension, then show it like this - 908 340 8836 x123;
  2. remove the numbers from the signatures of those employees, who don't have them in their entries in Xink.

While it's far from the trivial tasks to manually change this info in 100-2000 employees' entries in your AD or Xink, Liquid allows reaching this output with just a few filters in only 1 signature for all your employees at once. Easy and efficient!

{% if DirectPhone == blank %}{% else %}{% if DirectPhone | contains: 'x' %}{{DirectPhone | substr_after: '+1' | phone_format: '000-000-0000 x000'}} (direct)
{% else %}{{DirectPhone | substr_after: '+1' | phone_format: '000-000-0000'}} (direct)
{% endif %}{% endif %}

Example#2

You want to add the specific campaign in the signature for a limited group of your employees, who match 4 filters at once. While Campaign Rules allow filtering max 2 fields at once, Liquid provides the opportunity to check as many fields as you want simultaneously.

If the Country is Denmark and Office is not A080 and not A020 and not A310, then show this specific campaign.

{% unless Office | contains: 'A080' or Office | contains: 'A020' or Office | contains: 'A310' %}{% if Country | contains: 'Denmark' %}{{ campaign[16041] | raw }}{% endif %}{% endunless %}

Discover Liquid instructions

Don't use CASE, IFNULL and NULL together with Liquid in one template.

CASE, IFNULL and NULL don't work with Liquid. Don't combine them in one template together.

Objects

Objects tell Liquid where to show content on a page. Objects and variable names are denoted by double curly braces: {{ and }}.

  • Object fields contains employee's fields data 
    {{ Email }}
    {{ fields.Email }}
    {{ fields["Email"] }}
  • Object shared_fields is very similar to fields, but contains SHARED employee's fields data 
    {{ shared_fields["Email"] }}
  • Object campaign contains active campaigns 
    {{ campaign[11856] | raw }}
Tags

Tags create the logic and control flow for templates. They are denoted by curly braces and percent signs: {% and %}.
The markup used in tags does not produce any visible text. This means that you can assign variables and create conditions and loops without showing any of the Liquid logic on the page.

  • if
    Executes a block of code only if a certain condition is met (that is, if the result is true).
    {% if Email | contains: 'xink.io' %} Email contains 'xink.io' {% else %} Email does not contain 'xink.io' {% endif %}
    {% if Mobile == blank %}{% else %}M: {{Mobile}}{% endif %}{% if Mobile == blank or Phone == blank %}{% else %} | {% endif %} {% if Phone == blank %}{% else %}T: {{Phone}}{% endif %} {% if Phone == blank or DirectPhone == blank %}{% else %} | {% endif %} {% if DirectPhone == blank %}{% else %}DD: {{DirectPhone}}{% endif %}
    {% if Phone == blank %}{% else %}{{Phone | substr_after: '+1' | phone_format: '000-000-0000'}} (direct)
    {% if ShowDirect == 'True' or ShowDirect == 'true' %}d {{DirectPhone}}{% else %}{% endif %}
  • unless
    Like if, but executes a block of code only if a certain condition is not met (that is, if the result is false).
    {% unless Email | contains: 'xink.io' %} Email does not contain 'xink.io' {% endunless %}
  • case/when
    Creates a switch statement to execute a particular block of code when a variable has a specified value. case initializes the switch statement, and when statements define the various conditions. You can optionally add an else statement at the end of the case to provide code to execute if none of the conditions are met.
    {% case City %}{%when 'Hellerup'%}You're living in Denmark{%when 'Paris'%}France!{%else%}Your city is {{City}}{% endcase %}
    {% case State %}{%when 'California'%}CA {%when 'Florida'%}FL {%when 'Texas'%}TX {%when 'New Jersey'%}NJ {%when 'New York'%}NY {%when 'Ohio'%}OH {%when 'Missouri'%}MO {%when 'Arkansas'%}AR{%else%}{{State}}{% endcase %}
  • for
    Repeatedly executes a block of code 
    {% for entry in fields %} {{forloop.index}}. {{entry[0]}} : {{entry[1]}}{% endfor %} 
  • assign
    Creates a new variable.
    {% assign e = Email %} My email is {{ e }}.
  • capture
    Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through {% capture %} are strings. Using capture, you can create complex strings using other variables created with assign.
    {% assign n = DisplayName %} {% assign e = Email %} {% capture about_me %} I am {{ n }} and my email is {{ e }}. {% endcapture %} {{ about_me }}
Filters

Filters change the output of a Liquid object. They are used within an output and are separated by a |.

  • substr_before & substr_before_ci
    {{ Email | substr_before: 'xink.io' }}
    {{ Email | substr_before_ci: 'XINK.IO' }}

    Input:

    Output:

  • substr_after & substr_after_ci
    {{ Email | substr_after: '@' }}

    Input:

    Output:

  • append
    Concatenates two strings and returns the concatenated value.
    {{ Email | append: ' some text' }}

    Input:

    Output:

  • slice
    Slice filter trims the first 6 characters
    {{ your_field | slice: 6, 999 }}
    
    Explanation:
    
    • slice: 6, 999 starts at character position 6 (0-based index, so this skips the first 6 characters).
    • 999 is just a large number to capture the rest of the string.

    Input:
    12345 IT Infrastructure

    Output:
    IT Infrastructure 

  • prepend
    Adds the specified string to the beginning of another string.
    {{ Email | prepend: ' some text' }}

    Input:

    Output:

  • capitalize
    Makes the first character of a string capitalized.
    {{ Email | capitalize }}

    Input:

    Output:

  • downcase
    Makes each character in a string lowercase. It has no effect on strings which are already all lowercase.
    {{ 'SoMe TeXt' | downcase }}

    Input:

    Output:

  • upcase
    Makes each character in a string uppercase. It has no effect on strings which are already all uppercase.
    {{ 'SoMe TeXt' | upcase }}

    Input:

    Output:

  • remove_first
    Replaces only the first occurrence of the first argument in a string with the second argument.
    {{ 'SoMe TeXt' | replace_first: 'e', 'A' }}

    Input:

    Output:

  • replace
    Replaces every occurrence of an argument in a string with the second argument.
    {{ 'SoMe TeXt' | replace: 'e', 'A' }}

    Input:

    Output:

  • phone_format
    Changes the format of the phone number.
    {{'222 - (222)22' | phone_format: '000-00-00'}}
    {{Phone | phone_format: '+00 0000 0000'}}
    {{Phone | phone_format: '000"."0000"."0000'}}

    You can combine several filters together.

    You want to reformat this phone number +1 9083408836 into this one 908 340 8836.

    {{ Phone | substr_after: '+1' | phone_format: '000-000-0000'}} (direct)

    Input:

    Output:

  • minus
    Subtracts a number from another number.
    {{ 15 | minus: 3}}

    Input:

    Output:

  • plus
    Adds a number to another number.
    {{ 15 | plus: 3}}

    Input:

    Output:

  • ceil
    Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
    {{ 1.26 | ceil}}

    Input:

    Output:

  • floor
    Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
    {{ 1.26 | floor}}

    Input:

    Output:

  • modulo
    Returns the remainder of a division operation.
    {{ 10 | modulo: 3}}

    Input:

    Output:

  • round
    Rounds an input number to the nearest integer or, if a number is specified as an argument, to that number of decimal places.
    {{ 1.26 | round: 1}}

    Input:

    Output:

  • times
    Multiplies a number by another number.
    {{ 1.26 | times: 5}}

    Input:

    Output:

How to add the liquid in your signature

  1. Open your signature and click 'Source' on the toolbar.
  2. Type '@liquid' at the very top.
  3. Paste your Liquid operator.
  4. Click 'Source' again.
  5. Preview the result.
  6. Click 'OK'.
Use Source to add the Liquid instruction

@liquid must stay at the top of the signature!

Once you are sure that @liquid is at the top of your signature, feel free to embed the appropriate conditional under it in the Source.

Wrap fields in curly braces

In Liquid objects and variable names are denoted by double curly braces - {{Email}}, {{DisplayName}}, {{JobTitle}} etc.

When you select the fields from the Fields drop down list, they will come inside the round brackets by default - ((Email)), ((DisplayName)), ((JobTitle)). But when you use Liquid in your template, make sure you manually replaced the round brackets with the curly braces {{Email}}, {{DisplayName}}, {{JobTitle}}.

FAQ

What is Liquid used for in Xink?

Liquid is used to add logic and formatting to Xink email signatures. For example, you can hide blank fields, format phone numbers, show content only for selected employees, or display campaigns based on employee data.

Where do I add Liquid in a signature?

Add Liquid in the signature source code. The text @liquid must be placed at the very top of the signature source before any Liquid code is added.

What are the Liquid dropdown menus?

The Liquid instruction section contains three dropdown menus: Objects, Tags, and Filters. These sections explain how to display data, add logic, and format output in a signature.

Can I use CASE, IFNULL, or NULL together with Liquid?

No. Do not use CASE, IFNULL, or NULL together with Liquid in the same template.

Why are curly braces important in Liquid?

Liquid objects use double curly braces, such as {{Email}}, {{DisplayName}}, and {{JobTitle}}. Fields inserted from the field dropdown may use round brackets by default, so replace them manually when using Liquid.

SEO META

FieldText
Meta TitleHow to Use Liquid in Xink Email Signatures
Meta DescriptionLearn how to use Liquid in Xink email signatures to add dynamic content, hide blank fields, format data, and control campaign logic.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
Quick 1-on-1 Demo | Ⓒ 2026 Xink