Book a Call
NO.07
STATUSActive
OWNERYerain Abreu
FILEDn8n · AI
READ6 min

// FIELD NOTES — AI & AUTOMATION

The n8n HTML node, used as a templating layer.

JSON is a transport, not a presentation layer. Drop the HTML node between data-shaping and delivery; treat it like a view. Same workflow, ten lines of template, one platform-appropriate output.

01

// CONTEXT

The output looked like garbage every time it left the platform.

I've been running n8n in production for a year now — for editorial automation, internal ops, and the AI-assisted content pipelines I build for clients. About six months in, I hit the same problem on three different workflows: the output looked like garbage every time it left the platform.

JSON with literal \nsequences. Markdown that got mangled in Notion. Plain-text descriptions where every "smart quote" turned into ’. The fix turned out to be simpler than I expected.

// READ THIS IF

You've shipped at least one n8n workflowand you've noticed your output goes weird the moment it leaves the platform. If you haven't shipped one yet — start with the basics first.

02

// THE FIX

JSON is a transport.
HTML is a presentation layer.

The HTML node is usually framed as "scrape a page." But it's also a Handlebars-flavoured template renderer. Pipe any upstream JSON into it; get formatted output the next node can consume.

template.hbs  // PASTED INTO HTML NODE
// 1. Set node output mode to "HTML"
// 2. Paste this template:

{{#each items}}
  <h3>{{title}}</h3>
  <p>{{description}}</p>
  <a href="{{url}}">Read more →</a>
{{/each}}

// 3. Next node receives rendered string.

The mental shift is treating the HTML node like a view in MVC. Upstream nodes do the work. The HTML node does the presentation. Downstream nodes do the delivery.

03

// PATTERN

Four destinations.
One template each.

YouTube descriptions

YouTube strips tags but respects line breaks. Use the HTML node to render structured chapters, then YouTube's API stores plain text with real newlines — not literal \n characters. Pair with the YouTube node and you can ship descriptions straight from your transcript workflow.

Branch the same HTML output into all four. No transforms per destination. No code-node sprawl.

04

// DESTINATIONS

Where it earns its keep.

// DESTINATIONNATIVE FORMATHTML NODE FIT ★NOTES
YouTubePlain textSTRONGLine breaks survive
GmailHTML emailNATIVEPipes straight in
NotionMarkdownSKIPUse Markdown instead
SlackBlock KitSKIPBlock Kit is structured
WordPressHTMLNATIVEDrop into post body
/01
10
Lines of template
For 4 destinations
/02
0
Code-node forks
Down from 4
/03
5 min
To retrofit a flow
Existing workflow
/04
100%
Output legible
In every destination
05

// THE COMMANDMENTS

Do this.
Not that.

01
Treat the HTML node as a view layer.Render the data; let downstream nodes deliver it.
Treat it as a scraper only.That's its other job. Don't miss the templating use.
02
Keep the template dumb.Do conditionals + lookups in a Code node first.
Cram business logic into Handlebars.If you need {{#if}} three levels deep, refactor.
03
One template, branch the destinations.Same HTML feeds Gmail, YouTube, WP, Notion.
Write one transform per destination.You'll have 4× the maintenance.
04
Use it when the destination accepts HTML.Or when it strips tags but respects line breaks.
Use it for Markdown destinations.Notion, Slack via Block Kit, GitHub issues — skip.
05
Use it when output is for humans.Bold, links, lists, line breaks — all the things they expect.
Use it when output feeds another machine.Keep machine-bound data as JSON.

// SKIP THIS WHEN

Your template would be larger than your data. Three fields? Use String.template in a Code node.

06

// FAQ

Quick reference.

Q.01Does this work in self-hosted n8n and n8n Cloud?

Yes — the HTML node is a core node, available in both. No plugin or community node required.

Q.02Can I use it for emails with inline CSS?

Absolutely. Drop your inline-CSS email template in directly. Pair it with the Gmail or SMTP node and you've got a workflow-driven newsletter.

Q.03What about more complex logic — conditionals, loops?

Handlebars syntax handles {{#if}}, {{#each}}, and helpers. For anything beyond that, do the data work in a Code node first and keep the template dumb.

Q.04What's the latency cost?

Negligible — the HTML node is in-process template rendering. Single-digit milliseconds for any sane template size.

/END

// END OF FILE

Try this on your next workflow.

Yerain Abreu

// SEO & AI AUTOMATION · MT VERNON, WA

Ten years building organic-growth pipelines for YMYL verticals. Currently figuring out how to win in ChatGPT, Gemini, and Perplexity. Taking two retainer slots in Q3 2026.

LIKED THIS?Get the
next one.
FIELD NOTE NO.07 OF 42

// GROWTH SIGNAL · WEEKLY

More workflow tricks, every Tuesday.

SEO, AI automation, and the playbooks I actually run for clients. One email a week, no fluff.

// 1,800+ OPERATORS · ONE-CLICK UNSUB
// END OF FILEYERAIN ABREU · FIELD NOTES NO.07 · BUILT FEB 12 · UPDATED MAY 15, 2026
/07