Syntax
Reserved variables
These are injected at render time, not by your trigger payload. Full preview context is on Templates.Helper index
Built-in helpers
These are the default Handlebars helpers. They work in every template that uses Handlebars (official reference).if
Renders a block when the value is truthy. Usecondition, and, or or inside {{#if}} when you need a comparison or combined check. if itself does not compare two values — that is compare.
Syntax
{{else}} is optional. Chain further branches with {{else if ...}}.
Examples
false, 0, "", null, undefined. An empty array [] is truthy in Handlebars.
unless
Renders a block when the value is falsy. Inverse ofif.
Syntax
each
Iterates over an array or object. Inside the block, properties of the current item are in scope. Syntaxsteve, Olivia
{{else}} renders when the array is missing or empty.
with
Shifts context to a nested object so you can write{{city}} instead of {{address.city}}.
Syntax
Austin, US
If order.address is missing or empty, the example renders No address on file instead.
lookup
Looks up a value in an object against a key, where the key is the value of another variable. For example, ifstatus_key value is shipped, {{lookup statuses status_key}} is the same as {{statuses.shipped}}.
Syntax
Conditionals
default
Returns the variable if it has a value; otherwise returns the fallback. Treats"", null, and undefined as empty.
Syntax
Examples
Each row is the output of the expression with that mock data.
compare
Renders a block when the comparison is truthy. For email, you can also hide a row or block with display conditions instead of a helper. Syntax{{else}} is optional. If you omit it and the comparison is falsy, the helper renders nothing.
Examples
Each row is the output of the expression with that mock data.
Operators
Nested paths need the parent key present — see Nested paths.
{{#compare order.status '==' "shipped"}} does not run if order is missing. Guard the parent first:
condition
Returns a boolean for use inside{{#if}}. Use this when you need a comparison as a subexpression, not a block. If the variable is missing, condition returns false.
Syntax
Operators match
compare, except typeof is not supported.
condition is not a block helper. Use {{#if (condition ...)}}, not {{#condition ...}}.and
Returnstrue only when every argument is truthy. Use inside {{#if}}.
Syntax
condition:
Welcome to premium and Team workspace
or
Returnstrue when at least one argument is truthy. Use inside {{#if}}.
Syntax
condition:
Admin controls and Paid features
Dates
datetime-format
Returns a formatted date string. Throws an error if the value is not a valid date. Syntax
Example
JSON
jsonStringify
Converts a JSON value to a string. Use this to pass a whole object or array into an Inbox template’s custom JSON field. Syntaxvariable must be valid JSON-serializable input.
Example
jsonParse
Parses a JSON string into an object or array. Throws an error if the string is not valid JSON. Syntax
Example
pro
jsonPath
Reads a nested value from an object using a path string. Combine withjsonParse when the source is a JSON string.
Syntax
Example
Barcelona
Strings
All three helpers return'' when the value is not a string.
lowercase
Converts a string to lowercase. Syntaxuppercase
Converts a string to uppercase. Syntaxcapitalize
Uppercases the first character of a string. SyntaxMath
All math helpers throw an error if an argument is not a number.add, subtract, and multiply accept multiple arguments or an array of numbers.
add
Returns the sum. Syntaxsubtract
Returns the difference, left to right. Syntaxmultiply
Returns the product. Syntaxdivide
Returns the left operand divided by the right operand. Syntaxround
Rounds to the nearest integer. Syntaxmod
Returns the remainder ofdividend / divisor. The result takes the sign of the dividend. Throws an error if an input is not a number, or if the divisor is 0.
Syntax
Arrays
unique and list-agg pull a field out of objects; join and itemAt then format that list. For example, {{join (unique cities "city")}}.
unique
Returns unique items from an array. Duplicate values are dropped. Syntax
Examples
list-agg
Collects values from an array into a new array. Unlikeunique, duplicates are kept.
Syntax
Examples
itemAt
Returns the item at an index. In a batch or digest, use this to name the first person and$batched_events_count for the rest — liked by Mike and 3 others.
Syntax
Examples
Works on arrays of primitives (string, boolean, number). For an array of objects, combine with
unique or list-agg first, as in the batch example.join
Concatenates array values with a separator between each item. Syntax
Examples
For an array of objects, combine with
unique or list-agg first. {{join (unique cities "city")}} returns San Francisco, Austin; {{join (list-agg cities "city")}} keeps duplicates.length
Returns the number of items in an array, or the character length of a string. Returns0 for any other type.
Syntax
Localization
t
Resolves a translated string from the template’s translation files. Only works when translations are enabled for the template. Use this helper to keep one template and swap copy per locale. For file setup, pluralization examples, and CLI/API management, see Translations. Syntaxen.json
email.en.json
Nested paths
Guard the parent first:Troubleshooting
Apostrophes or special characters look garbled in preview
Apostrophes or special characters look garbled in preview
Double braces (
{{ var }}) turn special characters into safe codes so they display as text. An apostrophe can show up as ' in push preview.To print the value exactly as stored — apostrophes, &, or URLs — use triple braces: {{{ variable }}}.How does SuprSend avoid HTML injection when printing variables?
How does SuprSend avoid HTML injection when printing variables?
By default,
{{ var }} converts characters that could change the page (<, >, ", ', &) into safe text codes (HTML entities). That way a variable can’t inject HTML or scripts into the message.Use {{{ var }}} only when you need the raw character, such as a URL, and only for values you trust.When do I use if vs compare vs condition?
When do I use if vs compare vs condition?
if — show a block when something is present or true. Example: is this user on premium?compare — show a block when two values match (or don’t). Example: is plan equal to "pro"?condition — the same kind of comparison as compare, but you place it inside if so you can combine checks with and / or: {{#if (and (condition plan '==' "pro") has_access)}}.condition does not support typeof. Use compare for that.Why did the t helper throw an error in the template preview?
Why did the t helper throw an error in the template preview?
Preview errors when
t can’t find a string to print. That happens if translations are off for this template, the translation files are empty, the key isn’t in the default locale file, or the string expects a variable (like {{name}}) that you didn’t pass.Turn translations on, add the key to the default locale file, and pass every variable the string uses. See Translations.Why is my nested default not rendering?
Why is my nested default not rendering?
You’re asking for a field inside an object that isn’t in the data — for example
place.city when place itself is missing. Helpers can’t look inside something that isn’t there, so the fallback never runs.Check the parent first with {{#if place}}, then use default. See Nested paths.Next steps
Translations
File setup, pluralization, and locale fallback for the t helper.
JSONNET templates
Slack and MS Teams templates, which do not use Handlebars.