A list of Liquid tags, filters, and common variables supported in email templates.
For an overview of Liquid syntax, read the LiquidJS introduction. It has a brief summary of Liquid’s two kinds of markup:
Outputs, which output HTML.The syntax for outputs is a variable or value and optional list of filters surrounded by {{ and }}. For example, {{ user.name }}.
Tags, which control template rendering and implement logic.The syntax for tags is a tag name and optional arguments surrounded by{% and %}. For example, {% if user_metadata.lang == 'it' %} Ciao! {% endif %}.
This page lists the tags, filters, and variables supported in email templates.
To support debugging and development, our custom {% debug %} tag outputs a summary of the template variables available to your template when it was rendered.
The following variables are available to the From Address, Subject, and Message fields in every template (unless otherwise noted).To use untrusted properties in email templates, escape them with the escape filter (for example, {{ user.name | escape }}).
The application object, with access to the standard client properties like application.name and application.metadata
request_language language selection for users
connection.name
In the MFA enrollment email template, the connection.name variable is not available.
user.app_metadata, user attributes that can impact a user’s core functionality, such as how an application functions or what the user can access, including their support plan, security roles, and access control groups
user.user_metadata (untrusted if containing user-provided information), user attributes that do not impact a user’s core functionality, including user preferences
In the Passwordless OTP email template, only the email property of the user object is available.
When a user logs in through an Organization, the following additional variables are available:
organization.id
organization.display_name
organization.name
organization.metadata
organization.branding.logo_url
organization.branding.colors.primary
organization.branding.colors.page_background
Multiple variables:
custom_domain.domain, the tenant’s domain name
custom_domain.domain_metadata, the custom domain’s metadata fields (key-value pairs)
In email templates with a Redirect To URL field, only the following three variables are supported:
application.name (or its synonym client.name)
application.clientID
application.callback_domain (or its synonym client.callback_domain), which contains the origin of the first URL listed in the application’s Allowed Callback URL list. This is an origin and therefore includes the protocol (like https://) in addition to the domain.The callback domain lets you redirect users to a path of the application that triggered the action by using a syntax like {{ application.callback_domain }}/result_page.