I’m trying to create a simple workflow that sends an order confirmation HTML email that can potentially have multiple line items. I’m struggling with the part to setup the line-items decorated in HTML.
The response that I get from the webhook is something like this:
Ok. I think I have this figured out… Do I use a transform function to come up with the HTML block? And then have that block property feed into the next node?
You’re quite right, at the moment such transformations would require the use of a the Function node running custom JS.
As a starting point you could for example take a look at the example I have written in this thread building an email from multiple RSS Feed items (only the last node would be relevant):
The n8n data structure which you would need to follow when using the Function node is explained here in a bit more detail: Key Concepts | Docs
Once you have single item with a JSON field of email_html (or anything else really, this is just an arbitrary name I’ve used in my example) you can then reference this field containing your email HTML via an expression in any of the email nodes (Send Email, Mailgun, SendGrid etc.) to send out your mail.