Use list in metadata in events for email

  • 8 June 2024
  • 1 reply

Hi all,

We have started using events to trigger transactional emails and it’s great that we can use the metadata to add content to the email.

We want to add a list of things that are pending from the user. The list could be as small as one thing or as big as the user added to their tasks. How can we achieve this ? Ideally iterating over the list and just adding the text that was added to the event metadata. And yes, we’re aware that there’s a limit of 20 metadata parameters and that strings can be a maximum of 255 characters long.




Best answer by Ebenezer.Laleye 18 June 2024, 12:07

View original

1 reply

Userlevel 3
Badge +4

Hi @Aldo G ! Ebenezer here from Engineering Support👋.

I don't believe Intercom support complex scripting like this to iterate over the metadata to display the list of tasks.

You may be able to achieve a dynamic list using conditional blocks.

Here a possible example of this. 👇

<p>Hello [User's First Name],</p>
<p>Here is a list of your pending tasks:</p>
{{#if task_1}}
{{#if task_2}}
{{#if task_3}}
<!-- Add more conditions up to task_20 as needed -->
<p>Thank you!</p>

Hope this helps