Message Template Variables and Filters

Use message template variables and filters to personalize email, text message, Notify, and AI content with contact, flow, enrollment, organization, sender, AI analysis, media, and unsubscribe values.

Drip Drop validates saved content with Django template syntax. Messages can use only the variables listed on this page. The editor preview does not support every variable and filter that Drip Drop evaluates when sending.

Insert variable picker with contact, organization, sender, custom-field, and unsubscribe values.
  1. Place the cursor in the Subject or Body field. In a drag-and-drop email, first place the cursor inside a text block.
  2. Select Insert variable ({ }).
  3. Choose the variable you want. Drip Drop inserts its exact token at the cursor.

For the complete create and edit workflow, see Message Templates.

  1. Review the preview beside the editor. On a smaller screen, select Preview.
  2. For email, compare Plain Text and HTML output when both are available.
  3. Check the sample contact values, your organization and sender values, and typed custom-field samples before saving.

The editor preview is a client-side approximation. It substitutes advertised variables and applies date and floatformat, but it does not execute Django block tags or other filters. Saved messages are validated and rendered by Django when they are sent.

Variables in the Insert Variable Menu

The Insert variable menu is a convenient authoring subset, not the complete send-time context.

  • Contact: first name, last name, full name, email, phone, and contact custom fields.
  • Organization: name and business address fields.
  • Sender: first name, last name, email, and phone.
  • Flow and Enrollment: custom-field keys for those records.
  • Media: published assets, up to the first 100. The section label indicates when the list is truncated.
  • Unsubscribe: the %%UNSUBSCRIBE_URL%% placeholder.

The complete context below also includes UUIDs, flow.name, phone-format properties, AI analysis outputs, and additional media slugs. Those values remain valid even when they are not shown as built-in picker choices.

Contact Variables

Use contact variables to personalize content with the enrolled contact’s details.

{{ contact.first_name }}
{{ contact.last_name }}
{{ contact.name }}
{{ contact.email }}
{{ contact.phone }}

Available contact variables:

  • contact.uuid
  • contact.first_name
  • contact.last_name
  • contact.name
  • contact.email
  • contact.phone
  • contact.phone.as_e164
  • contact.phone.as_national
  • contact.phone.as_international
  • contact.phone.as_rfc3966
  • contact.custom.<field_key>

Example:

Hi {{ contact.first_name|default:"there" }},

Custom Field Variables

Use custom field keys under contact.custom, flow.custom, or enrollment.custom.

{{ contact.custom.company_name }}
{{ flow.custom.campaign_goal }}
{{ enrollment.custom.signup_source }}

Missing custom fields render blank.

Flow Variables

Available flow variables:

  • flow.uuid
  • flow.name
  • flow.custom.<field_key>

Example:

You are receiving this from {{ flow.name }}.

Enrollment Variables

Available enrollment variables:

  • enrollment.uuid
  • enrollment.custom.<field_key>

Example:

Your selected plan is {{ enrollment.custom.plan_name|default:"not selected yet" }}.

Organization Variables

Available organization variables:

  • organization.name
  • organization.address.formatted
  • organization.address.line1
  • organization.address.line2
  • organization.address.city
  • organization.address.state
  • organization.address.postal_code
  • organization.address.country

Example:

Thanks for your interest in {{ organization.name }}.

Sender Variables

Available sender variables:

  • sender.first_name
  • sender.last_name
  • sender.email
  • sender.phone
  • sender.phone.as_e164
  • sender.phone.as_national
  • sender.phone.as_international
  • sender.phone.as_rfc3966

Example:

Reply to {{ sender.first_name }} at {{ sender.email }}.

AI Analysis Variables

Use a successful upstream Analyze block’s output key and field key:

{{ ai.<output_key>.<field_key> }}

The latest successful run for that Analyze block supplies the value. A missing key, failed-only run, or unset output renders blank. Account-level template preview cannot resolve a flow-specific Analyze result, so it shows this variable as blank.

Media Variables

Published media assets are available by slug:

{{ media.<slug> }}

An unknown slug renders blank. The Insert variable menu lists up to the first 100 published assets; that menu limit does not narrow the send-time media context.

Compliance Variables

Use Insert variable → Unsubscribe to add the preferred authoring placeholder:

%%UNSUBSCRIBE_URL%%

Drip Drop replaces the placeholder with a recipient-specific URL when the message is sent. The send-time context also resolves {{ unsubscribe_url }}, but the editor inserts %%UNSUBSCRIBE_URL%%.

<a href="%%UNSUBSCRIBE_URL%%">Unsubscribe</a>

Drip Drop documents these conditional tags:

  • {% if ... %}
  • {% else %}
  • {% endif %}

Example:

{% if contact.custom.company_name %}
Thanks for checking out options for {{ contact.custom.company_name }}.
{% else %}
Thanks for checking out DripDrop.
{% endif %}

You can also check simple values:

{% if contact.email %}
We will send details to {{ contact.email }}.
{% else %}
Reply with your best email and we will send details there.
{% endif %}

default

Use default when an empty or otherwise false value should fall back to replacement text.

Hi {{ contact.first_name|default:"there" }},

default_if_none

Use default_if_none only when an existing value is None. It does not replace a missing custom-field key, which renders as an empty string.

Plan: {{ enrollment.custom.plan_name|default_if_none:"Not selected" }}

date

Use date to format date or datetime custom fields.

Signup date: {{ contact.custom.signup_date|date:"F j, Y" }}
Last seen: {{ contact.custom.last_seen|date:"Y-m-d g:i A" }}

floatformat

Use floatformat to control decimal places.

Estimated value: ${{ contact.custom.deal_value|floatformat:2 }}

upper

{{ contact.first_name|upper }}

lower

{{ contact.email|lower }}

capfirst

{{ contact.first_name|capfirst }}

truncatechars

{{ contact.custom.notes|truncatechars:80 }}

truncatewords

{{ contact.custom.notes|truncatewords:12 }}

length

{% if contact.custom.notes|length %}
We have notes on file for you.
{% else %}
No notes yet.
{% endif %}

Use yesno to display readable text for true, false, and unknown values.

SMS consent: {{ contact.custom.sms_opted_in|yesno:"Yes,No,Unknown" }}

escape

Use escape when inserting user-provided values into HTML content.

{{ contact.custom.company_name|escape }}

urlencode

Use urlencode when putting a value into a URL query string.

https://example.com/welcome?email={{ contact.email|urlencode }}

Drip Drop validates saved message content with Django’s template engine. Verified block syntax includes if, for, and with, and template comments are accepted. Unknown tags, unknown filters, invalid block syntax, and mismatched closing tags prevent the template from saving.

Template code can read only the whitelisted message context documented on this page. It cannot traverse from contact or flow values into account owners, provider credentials, or other model relationships.

The editor preview is not a full Django renderer. It substitutes supported paths and previews date and floatformat, but it does not evaluate block tags or other filters.

No templates are visible
  • Clear search, type, status, or tag filters.
  • Confirm you are in the correct workspace.
Template is missing from a flow block
  • Confirm the template type matches the block type.
  • Check whether the template status needs to be Active for the place you are selecting it.
  • Refresh the flow editor if the template was created in another tab.
Variables are not replaced
  • Check the variable spelling and braces.
  • Confirm the contact or custom field has a value.
  • Preview with sample contact data before sending.
AI assistant is not available
  • Confirm an AI provider is connected if your workspace uses AI-assisted template writing.
  • Open Integrations → AI, then confirm AI integrations are enabled.
  • Message Templates — create, preview, and save reusable email and text-message content.
  • Flow Blocks — use templates and variables in Email, Text Message, Notify, and AI blocks.
  • Contacts — manage the contact values and custom fields used by contact variables.
  • Unsubscribe and Public Pages — review recipient-facing unsubscribe links and preview behavior.