Learn how to use the Novu notification template editor to design notifications
{{ variable_name }}
.
Novu templates allow you to reference several types of variables:
{ "order_id": "12345" }
in your payload, you can reference it in your template as {{ payload.order_id }}
.
firstName
or custom subscriber properties) using {{ subscriber.* }}
. For instance:
capitalize
capitalize
to ensure proper formatting for user names.
Hello John, Welcome to Novu! We're excited to have you on board.
upcase
upcase
for emphasizing specific information like workspace names.
Your workspace TEAM ALPHA has been successfully created.
downcase
downcase
for consistent email formatting or usernames.
Hi john.doe@example.com, We’ve sent a confirmation to your inbox.
date
date
to format subscription or event dates.
Your subscription will renew on December 31, 2024.
truncate
truncate
to shorten long content like notification messages.
New comment on your post: Great work on your... Click here to read more.
truncatewords
truncatewords
to limit the number of words in a preview.
John, here's a preview of the article: Novu is a flexible and...
replace
replace
to dynamically update template content.
Hi John, Your premium subscription is active.
split
split
to parse tags or interests.
"announcements,updates,offers"
Output:You have new updates in announcements, updates, offers.
join
join
to list multiple items in a human-readable way.
["Upload documents", "Confirm email", "Schedule meeting"]
Output:Hello John, You have the following items pending: Upload documents, Confirm email, Schedule meeting.
default
default
to provide fallback values.
Hi John, Your account settings are updated.