Share this lesson

Personalise your messages with Liquid Syntax

Your lemlist campaigns may include dynamic, tailored content using liquid syntax. Based on lead information like name, job title, and location, it adjusts your message using logical conditions and variables. Use liquid syntax to make each email feel distinct and relevant, increasing engagement and response rates. Liquid syntax lets you automate tailored outreach at scale, whether you’re welcoming someone by gender or time zone.

Remember, there should be no spaces in your variables. You can use these formats:

1
camelCase
2
PascalCase
3
snake_case
4
kebab-case

For example, instead of writing “My custom variable,” use:

  • myCustomVariable
  • MyCustomVariable
  • my_custom_variable
  • my-custom-variable

Now, let’s get into creating liquid syntax!

Personalizing greetings

To personalize greetings based on gender, create a “gender” variable for each lead. For example:

{% if gender == "male" %}Hello Mister,{% endif %}

Or:

{% if gender == "male" %}Mister,{% else %}Miss,{% endif %}

Dynamic content based on job titles

You can also customize content based on job titles. For instance:

{% if position == "founder" %}As a founder, you need to learn to delegate.{% endif %}

Another example:

{% if job_title contains 'Manager' %}As a manager, you understand the importance of...{% else %}I wanted to reach out because...{% endif %}

Ensure the variable job_title matches exactly with your lead data.

You can also combine operators:

{% if type == "freelance" or type == "smb" %}We know it's not easy as a small company{% endif %}

Greetings based on time zone

Remember, liquid syntax uses server time based in France, not the campaign’s timezone. Here’s an example for different greetings based on time:

{% assign now = "now" | date: "%H" %}{% if now < 12 %}Good Morning!{% elsif now < 18 %}Good Afternoon!{% else %}Good Evening!{% endif %}

Alternatively:

{% assign hour = "now" | date: "%H" | plus: 0 %}{% if hour >= 17 %}Text for after 5 PM{% else %}Text for before 5 PM{% endif %}

  • Use plus to add hours for timezones ahead of France.
  • Use minus to subtract hours for timezones behind.

Spin syntax

You can use spin syntax to create multiple versions of a sentence. lemlist will randomly select one when the email is sent. For example:

{% spin %}{% variation %}I really want to talk with you.{% variation %}I think we should meet.{% variation %}What if we grab coffee?{% variation %}I really like your shoes.{% endspin %}

Every time you open the preview, you’ll see a different variation.

Pro tips

If your syntax isn’t working, try these checks:

1
Ensure brackets are correctly opened and closed.
2
Make sure there are no spaces in your variables.
3
Verify that the text matches your variable exactly.

For example:

{% if myVariable == "text" %}My text{% endif %}

If myVariable equals “text” for the lead, it will work. Writing txt instead won’t work.

How to generate liquid syntax with lemlist

1
Go to the “Sequence” section of your campaign.
2
Under a specific step, click “Add Personalization.”
3
Select “Liquid syntax” and create your new one.

For example, if you want to add text based on the lead’s country, you can build something like this:

{% if country == "France" %}Bonjour!{% endif %}

Still stuck?

If you need further assistance, contact lemlist customer support for help or any other inquiry.

Copied