Skip to main content

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.

Thanks,

Aldo 

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 pUser's First Name],</p>
<p>Here is a list of your pending tasks:</p>
<ul>
{{#if task_1}}
<li>{{task_1}}</li>
{{/if}}
{{#if task_2}}
<li>{{task_2}}</li>
{{/if}}
{{#if task_3}}
<li>{{task_3}}</li>
{{/if}}
<!-- Add more conditions up to task_20 as needed -->
</ul>
<p>Thank you!</p>

Hope this helps
 


Reply