Loop over array inside html template

Hello,

My workflow is this : Receiving a array of products from an online shop then loops over this array and display each product with their prices inside an html template. The problem is that i cannot loop inside an html template because n8n cannot execute js inside an html template.

What alternative solutions can I look into?

Thanks

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

The trick here is to format each item (i.e. product) individually and then concatenate them together using the ‘Summarize’ node. You could then insert that into your HTML template.

Here’s an example: