I want to create a workflow who recieve a JSON params, render html template and convert it to PDF. I can use variables on html template but. Can i use conditions as if/else or loops as for/foreach/while?
I want to create a workflow who recieve a JSON params, render html template and convert it to PDF. I can use variables on html template but. Can i use conditions as if/else or loops as for/foreach/while
HTML template uses handlebars or something like this?
In the actual template itself, no - while you can use expressions to pull in data, you wouldn’t be able to do a full loop. JS in <script> tags is included for templating, but that won’t be executed in n8n.
You could try to use a code node here that looks for if this content exists, and then use that in the HTML template since expressions do exist
I’d also suggest heading over to our feature request section of our forums and creating a thread there, as our product team reads those forums regularly!