Templates

Templates are a great way to decouple the rendering of a notification from the data that powers it. Templates are composed on a per category, per channel basis.

How to compose templates

Please visit the Categories tab in the dashboard. Select your desired category (or create a new one), then switch to the Templates tab. You can create or edit templates for each channel by selecting from the dropdown.

Templates override the title and content of notifications.

Merge tags such as {{ notification.content }} are supported — a complete list will appear when you press {, after which you can continue typing or select one from the list.

More advanced functionality such as control flow and default values are also supported — consult the Liquid reference more information.

Notification Overrides further override the title and content of templates.

Notification title

The title will be the subject of the email and push notifications and the first bolded line for in-app and Slack messages.

Content

Content is the body of your notification - the message you want to pass on to users. Content will be the body of an email and below the notification title for in-app notifications.

The content input supports HTML and Markdown.

Limitations

  • Templates work across channels subject to limitations for that channel. For instance, Slack does not support headings.
  • Channel-specific styling notes:
    • In-app and email: Markdown converts to HTML
    • Slack: HTML sends as raw text. MagicBell skips the Markdown parsing, and Slack will parse any Markdown.
    • Push and SMS: Markdown is removed. HTML sends as raw text.

We suggest using provider-specific templates or overrides in the API to avoid these limitations.