Skip to main content
Version: 1.5.x

Dynamic Content

You can add dynamic content to your email using Merge tags. Merge tags can be inserted into a block of text by clicking on the "Merge Tags" button in the text editor toolbar.

Eg:

Suppose you want to send a welcome email and the the email content should change based on the recipient, then you can use dynamic content.

Dynamic Content

Dynamic tags for batched notifications

Here is a list of variables that you can use to build your notification's batched version.

  • batching.totalCount : Total number of notifications included in the batch. It includes the final batched notification too.
  • batching.totalCountExceptThis : Total number of notifications except the batched notification.
  • batching.notifications : An array that lists all batched notifications.
  • batching.payloads : An array that lists all the payloads in the batch. data variables sent with the trigger are included in this object.

For example, the batched version of your template content could be like -

{{commenterName}} and {{batching.totalCountExceptThis}} commented on your post

Loop through the batched notifications

Here’s an example of how you can create a notification template that loops through the batched notifications:

<ul>
{{#each batching.payloads}}
<li>{{this.data.commenterName}}: {{this.data.comment}}</li>
{{/each}}
</ul>

FAQs

Are dynamic tags limited to the ones shown here?

No. You can use any property from your user's profile.

Are dynamic tags supported only in email body?

No. You can use dynamic tags in email subject, body or any other channel such as SMS, In-App, Push etc