Using Labels to Customize Messages

Last updated: March 26, 2026

You can use has_label() in both text broadcasts and email blasts to show different content to recipients based on their labels.

Basic syntax

{% if has_label("Label Name") %}
  Content for people with this label.
{% else %}
  Content for everyone else.
{% endif %}

Label names are case-insensitive, so has_label("volunteer") and has_label("Volunteer") behave the same way.

Checking multiple labels

Use or to match any of several labels:

{% if has_label("Donor") or has_label("Volunteer") %}
  Thank you for your involvement — we couldn't do this without you!
{% else %}
  We hope you'll join us at an upcoming event.
{% endif %}

Use and to require that a contact has all of the labels:

{% if has_label("Donor") and has_label("Volunteer") %}
  You've given both your time and your money — thank you!
{% endif %}

Combining with other custom fields

has_label() works alongside any other template variables in the same message:

{% if has_label("Attendee") %}
  Thank you for attending our meeting, {{ first_name | title }}!
{% else %}
  We hope to see you next time, {{ first_name | title }}.
{% endif %}

In the HTML email editor

The syntax is the same — your {% if %} blocks can wrap any HTML content:

{% if has_label("Attendee") %}
  <p>Thank you for being part of our record crowd last Tuesday!</p>{% else %}
  <p>We had a huge turnout at our rally last Tuesday!</p>{% endif %}

Always use straight quotation marks (") inside has_label(), not curly/smart quotes. Smart quotes will cause a template error. This is especially easy to accidentally introduce in HTML editors that auto-format text.

Previewing conditional content

The preview screen shows one recipient at a time. If the previewed contact doesn't have the label you're checking, you'll always see the {% else %} branch — this doesn't mean something is wrong. Cycle through a few contacts in the preview to verify both versions render correctly.