Learning Objective
By the end of this guide, you'll know how to format custom variables correctly, use fallback values to handle missing data, avoid common syntax errors, and create custom variables through CSV imports to personalize your emails at scale.
Why This Matters
Variables turn one email template into thousands of personalized messages. Without proper formatting, variables break, showing instead of "Sarah" or displaying incomplete sentences like "Hi , " when data is missing.{{firstName}}
Correct variable formatting ensures:
Personalization works for every lead
Emails look professional even when the data is incomplete
Your campaigns scale without manual editing
What Are Custom Variables?
Custom variables are placeholders in your email that lemlist replaces with lead-specific data when sending.
Example:
You write:
Hi{{firstName}}, I noticed{{companyName}}is growing fast.Lead data: firstName = "Sarah", companyName = "Acme Corp"
Email sends as:
Hi Sarah, I noticed Acme Corp is growing fast.
Default lemlist Variables
lemlist includes these default contact fields (the Default section of the variable picker):
First name:
{{firstName}}Last name:
{{lastName}}Email:
{{email}}Company name:
{{companyName}}Company domain
Job title:
{{jobTitle}}Job description
Phone:
{{phone}}LinkedIn URL:
{{linkedinUrl}}Photo
Sender variables, such as Sender name and Sender first name, are on the Sender tab of the variable picker. is not a default field: it is a custom variable, created when your CSV has an icebreaker column.{{icebreaker}}
These work automatically when you import leads with matching CSV column names.
How to Create Custom Variables
Custom variables are created from your CSV column headers.
When you import a CSV:
Default columns (email, firstName, companyName) map to default variables
Any additional columns automatically become custom variables
The column header name becomes the variable name
Example CSV:
email firstName companyName painPoint industry [email protected] Sarah Acme Corp Lead generation SaaS
Resulting variables:
(default){{email}}(default){{firstName}}(default){{companyName}}(custom){{painPoint}}(custom){{industry}}
Use in email:
Hi ,{{firstName}}
I know companies like{{industry}} often struggle with{{companyName}}.{{painPoint}}
Variable Formatting Rules
Rule 1: Variables Are Case-Sensitive
≠ {{firstName}} ≠ {{firstname}}{{FirstName}}
Your CSV column header must match the variable name exactly.
💡 Best practice: Pick one format, camelCase (companyName) or underscores (company_name), and use it consistently.
Rule 2: No Spaces Allowed
CORRECT:
{{firstName}}{{companyName}}– Underscores work too{{company_name}}
INCORRECT:
– Space breaks the variable{{first name}}– Spaces inside braces break the variable{{firstName}}
Rule 3: Correct Brace Format
CORRECT:
– Two opening braces, two closing braces{{firstName}}
INCORRECT:
{firstName}– Only one brace{{firstName}– Missing closing braces[[firstName]]– Wrong bracket type
Using Fallback Values
If a variable is empty for a lead, it displays awkwardly:
Without fallback:
Template:
Hello{{firstName}},If firstName is empty:
Hello ,← Looks broken
With fallback:
Template:
Hello{{firstName|there}},If firstName is empty:
Hello there,← Professional and complete
Fallback Syntax
Format: {{variable|fallback}}
Examples:
{{firstName|there}}{{companyName|your company}}{{industry|your industry}}
Choose natural fallback values:
Good:
,{{firstName|there}}{{firstName|friend}}Bad:
,{{firstName|MISSING}}{{firstName|[name]}}
Common Mistakes and Fixes
Issue: Variable shows as instead of the actual name{{firstName}}
Fix:
Check CSV column is named
firstName(case-sensitive)Verify the lead has data in that column
Ensure no spaces in variable:
not{{firstName}}{{firstName}}
Issue: Email displays "Hi , " with an extra comma
Fix:
Add fallback:
{{firstName|there}}Ensure all leads have firstName data before importing
Make sure that there are no extra spaces after the first names of leads in your CSV file
Issue: Duplicate variables in the dropdown
Cause: The CSV has columns with similar names (e.g., firstname and firstName).
Fix:
Standardize CSV column names before importing
Remove duplicate columns
Issue: A sender variable doesn't work in a call task
Fix:
Check for incorrectly typed variables in call tasks, such as
{{senderFirstName}}, and replace them with the correct forms like{{sender.firstName}}. Ensure uniformity in variable usage across campaigns.
Advanced: Images as Variables
Variables can contain image URLs for personalized visuals.
CSV example:
email firstName companyLogo [email protected] Sarah https://acme.com/logo.png
Use in email (HTML mode):
<img src="{{companyLogo}}" alt="Logo" width="150">Each lead sees their company's logo in the email.
💡 Note: Custom variables support up to 2,000 characters.
Optimization Tips
Always use fallbacks: Protect against missing data with fallback values for every variable.
Keep names short and clear: is better than {{painPoint}}.{{leadMainPainPointIssue}}
Test with missing data: Before launching, test your email with leads that have empty fields to verify fallbacks work.
Standardize naming: Use the same format (camelCase or underscores) for all your custom variables to reduce errors.
Validate CSV before importing: Check column headers match your variable names exactly (case-sensitive) before uploading.
