Leverage conditional logic in your cold emails to create hyper-personalized messages. With Liquid Syntax in Smartlead, you can use in-text logic and fallbacks to avoid empty variables and missed opportunities.
What Is Liquid Syntax?
Liquid Syntax lets you write conditional logic inside your email templates. It allows you to show or hide parts of your message based on available lead data.
Think of it like this: if first_name exists, use it. If not, fall back to last_name or a default value.
Basic Example with Fallback
{{#if first_name}} Hey {{first_name}}, {{else}} Hey there, {{/if}}
This checks if first_name exists. If yes, it adds a personalized greeting. If not, it falls back to using the last name.
Supported Logical Operators
You can use the following operators inside conditions:
'==' — equal to
'!=' — not equal to
'>' — greater than
'<' — less than
'gte' — greater than or equal to
'lte' — less than or equal to
Wrap operators in single quotes: use '==', not ==
Use Cases to Create Powerful Copy
1. Role-Based Personalization
{{#if position '==' "founder"}} As the founder of the business... {{/if}}
2. Conditional Based on Review Ratings
{{#if google_review 'gte' 4}} Congrats on collecting good reviews for your business {{else}} We'd love to help you increase your reviews {{/if}}
3. Numeric Data Triggers
{{#if number_of_reviews '<' 15}} Noticed you've got less than 15 reviews. We can get you 40 organic 4.5-star reviews. Can I send you a document highlighting how? {{/if}}
Common Errors to Avoid
Use single quotes around operators: '==', '>', etc.
Close all {{#if}}...{{/if}} blocks properly
Ensure variable names match your data fields exactly
Do not use double equals == without quotes - it will break
Final Tip
Using Liquid Syntax with thoughtful conditions ensures your message always feels relevant - even if some lead data is missing. This increases engagement and builds trust from the first touchpoint.