Expression in a HTML node?

I am trying to add an expression into a HTML file - for eample:

Hello {{ $('Set Names').item.json.fname }}

It works if I just paste the text into a generateHTMLtemplate node - but I want to pull the HTML template from an external source like (in this case Cockpit):

If I add the ‘content’ field to a HTML node I get this:

The expression is displayed as text.

But, if I add the expression after the content it will show the name - like this:

Note it only shows the first instance - and shows the expression at the end - adding a second instance will do this:

How do I get the HTML node to pull in the expression data correctly??

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:

@seank1968 , pass your content holding the string with the embedded expression as an argument to $evaluateExpression() method.

Perfect - thank you!