Loop with object list not working

Hi,

I send following data with the single send api:

{ ... 
 "customProperties": {
 "products": [
 {
 "product_id": "PSKE",
 "product_name": "Managed Kubernetes",
 "price": "0,00&bnsp;€",
 "quantity": "1"
 }
 ],
... }

The template module contains following code:

{% for item in custom.products %} 
 <tr>
 <td>{{ item.product_id }}</td>
 <td>{{ item.product_name }}</td>
 <td>{{ item.quantity }}</td>
 <td>{{ item.price }}</td>
 </tr>
{% endfor %}

All values in the e-mail are empty:

 <tr>
 <td style="font-family:Arial, sans-serif; font-size:15px; color:#23496d; word-break:break-word"></td>
 <td style="font-family:Arial, sans-serif; font-size:15px; color:#23496d; word-break:break-word"></td>
 <td style="font-family:Arial, sans-serif; font-size:15px; color:#23496d; word-break:break-word"></td>
 <td style="font-family:Arial, sans-serif; font-size:15px; color:#23496d; word-break:break-word"></td>
 </tr>

Why?

Hey @hkampen and Happy Wednesday!
Thank you so much for connecting with the HubSpot Community!
Let’s reach out to our amazing Top Experts! Hi @Anton, @sylvain_tirreau and @evaldas do you have any suggestions to support @hkampen, please?
Thank you all in advance for sharing your valuable insights!

Wishing you a wonderful day!
Bérangère

Hi @hkampen,

Doesn’t look like there is anything wrong in your code examples.

One thing that comes to mind is to check whether the email template is enabled for programmable content. This feature works only in Marketing Hub Pro or Enterprise - so that is something to check as well.