Using Conditions in Email Signatures
Want to make your email signatures smarter? With Spreadly, you can use conditions to show or hide specific content—like legal disclaimers—based on the email context. This is super useful if, for example, you want to display a disclaimer only for external recipients, but keep things clean for internal emails.
In this article, we'll walk you through:
- How conditions work in Spreadly signatures
- Which conditions are available
- Real-world example for legal disclaimers
- A quick reference for all condition types
What Are Conditions?
Conditions let you control what parts of your email signature are shown, depending on things like:
- If the recipient is external
- Whether the email is a reply or forwarded message
- Other variables you define
You use Liquid syntax ({% if ... %}
, {% unless ... %}
, etc.) to write these conditions directly in your signature template.
Example: Legal Disclaimer Only for External Emails
Let's say you want to add a legal disclaimer at the bottom of your signature, but only if the recipient is external.
Here's how your signature template could look:
Notice this part at the end:
{% if email.is_external %}
This email and any attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed...
{% endif %}
How it looks in action
Available Condition Types
Spreadly supports several condition types, so you can get super specific with your rules. Here’s a quick overview of the main ones, along with examples:
1. if
Executes a block of code only if a certain condition is true.
{% if product.title == "Awesome Shoes" %}
These shoes are awesome!
{% endif %}
2. unless
The opposite of if—executes a block of code only if a certain condition is not met.
{% unless product.title == "Awesome Shoes" %}
These shoes are not awesome.
{% endunless %}
This is the same as:
{% if product.title != "Awesome Shoes" %}
These shoes are not awesome.
{% endif %}
3. elsif / else
Add more conditions within an if or unless block.
{% if customer.name == "kevin" %}
Hey Kevin!
{% elsif customer.name == "anonymous" %}
Hey Anonymous!
{% else %}
Hi Stranger!
{% endif %}
4. case/when
Creates a switch statement to execute a particular block of code when a variable has a specified value.
{% assign handle = "cake" %}
{% case handle %}
{% when "cake" %}
This is a cake
{% when "cookie", "biscuit" %}
This is a cookie
{% else %}
This is not a cake nor a cookie
{% endcase %}
Pro Tips
- You can use variables like email.is_external, email.is_forwarded, and email.is_reply in your conditions.
- Combine multiple conditions for even more control.
- Use these features to ensure you’re only showing the right content to the right people, keeping your signature tidy and compliant!
- You can check the existence of a placeholder by
{% if user.phone %}
Updated on: 14/07/2025
Thank you!