Resources · n8n integration

n8n HTML nodeConfigure HTML in n8n.

The n8n HTML node works markup in both directions. It writes HTML from the data flowing through a workflow, and it reads values back out of a page. Three operations cover the whole job, there is no account to connect, and the node runs once per incoming item.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n HTML node actually do?

The HTML node ships with n8n and handles both directions of markup inside a workflow. It builds an HTML document from the data you already have, and it pulls structured values back out of HTML that arrives either as text in a JSON field or as a binary .html file. One Operation dropdown, three choices, and the panel changes shape depending on the one you pick.

The node landed in n8n 0.213.0, where it replaced the older HTML Extract node. That history explains the shape of the panel: extraction came first, template rendering and table conversion were folded into the same node afterwards. The catalogue lists the node at version 1, so an old workflow can show a panel with fewer options, and a node never changes version by itself.

Scraping a public page into a row. A workflow fetches the page with HTTP Request, hands the response to Extract HTML Content, and names one key per CSS selector: a price, a title, a stock label. The output is a flat item you can write straight into Google Sheets, with no parsing code in between.

Turning a query result into a readable email. Generate HTML template takes the fields of each item and drops them into markup you control, expressions included. The rendered document goes to Gmail as the body of the message. When the layout does not need to be custom, Convert to HTML Table does the same job with zero markup: it prints the items as a table and lets you style it through attributes.

Reading an HTML attachment. An email arrives with an .html report attached, the binary field goes into Extract HTML Content with Source Data set to binary, and the selectors pick the two figures that matter. Downstream, Switch routes the item depending on what came back.

Where this node stops is easy to describe. It does not download anything, so a page always has to be fetched first. It does not execute JavaScript: script tags are copied into the rendered output as they are, which also means a page built entirely in the browser will not expose its content to a selector. And a template fed with untrusted values is a cross-site scripting risk, so check what goes into the markup before rendering it. If you want the wider picture on the tool itself, the n8n review covers it.

Actions

Which operation of the HTML node do you need?

The HTML node exposes 3 operations. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Generate HTML template

generateHtmlTemplate

What you see in n8n

Notes & use cases

Write the markup once and the operation renders it for every item that reaches the node, so the output is a finished document rather than a bag of fields. Standard HTML, CSS inside a style tag and expressions wrapped in {{}} all belong in the same template.

Key parameters

  • HTML Template: the markup to render. Values come from the previous node through an expression such as {{ $json.total }}. Anything inside a script tag is kept in the output but never executed by n8n.
Use cases
a branded recap built from a query and sent as an email body. Sanitize what you inject: an untrusted value pasted into the template introduces cross-site scripting.
02

Extract HTML Content

extractHtmlContent

What you see in n8n

Notes & use cases

Give this operation a page and a list of selectors, and it returns one field per selector on the outgoing item.

Key parameters

  • Input Binary Field: required, the name of the input binary field containing the file to be extracted.
  • Source Data: binary for a file, json for HTML already held in a property.
  • Extraction Values: one entry per value, with a Key, a CSS Selector such as .price and a Return Value among text, html, attribute and value. Attribute names the one to read, Skip Selectors drops parts of the page, Return Array splits matches.
  • Trim Values and Clean Up Text: strip surrounding whitespace and newlines.
Use cases
reading a listing page into a price and a title.
03

Convert to HTML Table

convertToHtmlTable

What you see in n8n

Notes & use cases

Nothing to configure on this one: it expects data from another node and prints the incoming items as a table, one column per field. The whole customization lives in its options.

Key parameters

  • Capitalize Headers: turned on, the header cells are capitalized.
  • Custom Styling: turned on, your own styling applies instead of the default one.
  • Caption: a caption added to the table.
  • Table Attributes, Header Attributes, Row Attributes and Cell Attributes: attributes attached respectively to the table, its headers, its rows and its cells, such as a style attribute.
Use cases
a daily digest where the shape of the data changes often and writing a template by hand would mean editing it every week.
Need help

Need help automating HTML with n8n?

A person reads every message.

FAQ

HTML node questions, answered

01Is the n8n HTML node free on Cloud and self-hosted?
Yes. It is a core node, shipped with n8n itself, so there is nothing to install and no extra cost on n8n's side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use licence. A workflow built in one place runs identically in the other. The only thing that differs between instances is the version of n8n you run, which decides the options the panel shows you.
02What credentials does the HTML node need?
None. There is no credential to create and no Authentication selector in the panel, because the node works on data that is already inside the workflow rather than calling a service. Nothing to set up on the account side at all. What the node does need is an input: it runs on every item that reaches it and does not open a workflow on its own, so a trigger has to come first. A Schedule Trigger, a Webhook or the trigger of whichever tool you are automating all do the job.
03What are the limits of the HTML node in n8n?
It works on markup that is already there. Fetching the page is somebody else's job, usually HTTP Request. It never runs JavaScript either: script tags in a template are carried into the output as-is, and a page that builds its content in the browser will not give anything to a CSS selector. Generating a template from untrusted input is a cross-site scripting risk worth taking seriously. Finally the catalogue shows version 1 of the node, and an older workflow can display an earlier panel with fewer options.
04HTML node or Code node for parsing a page?
Take the HTML node whenever the job can be described as a list of CSS selectors, which covers most scraping. You name a key, you name a selector, you pick text, html, attribute or value, and you are done, with no script to maintain and a panel a colleague can read. Reach for something else when the extraction depends on logic rather than on structure, for instance walking a tree or rebuilding a broken document. Same reasoning on the rendering side: Convert to HTML Table for a plain table, Generate HTML template when the layout matters.
05n8n or Make for working with HTML?
It depends on where your data is allowed to live. Make, formerly Integromat, is a hosted automation platform with no self-hosting option and pricing charged per operation, which suits a team that wants nothing to run. n8n can also be self-hosted with Docker or npm, so the pages you scrape and the documents you render stay on your own machine, and the cost model follows the instance rather than the volume. Both draw the logic visually. Judge on hosting, data control, cost model and how you prefer to read a workflow.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.