Steps
All values empty on a real site? The page is built by JavaScript
The HTML node only sees the HTML the server sent. No JavaScript runs. On a page with an empty
<div id="app">and its data inside a<script>tag, every key came back as""and the run was green. To check, look at the raw response of your HTTP Request node: if the text you want is not in it, no selector will find it. Call the JSON API the page itself uses (open the browser DevTools, Network tab), read the JSON embedded in the page, or use a headless-browser scraping service.Only one result? Turn on Return Array
A selector that matched 2 elements returned only the first one (
"One"), with no warning. With Return Array on, it returned["One","Two"]. A selector that matched nothing returned""(or[]with Return Array), again with no error, so an empty value usually means the selector is wrong, not the node.Fix "No property named ... exists!": match the source
With Source Data JSON, the node reads the field named in JSON Property (
databy default). When the HTML was indataand the field was set tobody, it failed withNo property named "body" exists!. When the HTTP Request node had saved the page as a file, Source Data JSON failed withNo property named "data" exists!; switching Source Data to Binary fixed it. Dot notation such asbody.htmlworked for nested fields, but pointing at the object itself ({data: {html: ...}}) gave""for every key with a green run.Check the selector: CSS only, and classes are case-sensitive
The node uses CSS selectors (cheerio). XPath like
//h1failed withEmpty sub-selector, and a broken selector such asdiv[failed withExpected name, found. Tag names ignore case (h1matched<H1>), but class names do not:.bigdid not matchclass="Big". Selectors copied from DevTools often assume the wrong nesting:div.p a spanfound nothing because the span sat next to the link, while.p > .priceworked. Extra pseudo-selectors worked too:.p:nth-child(3) a,a:contains('Two')and.price:eq(1).Getting links, input values or HTML
For links, set Return Value to Attribute and Attribute to
href: we got["/item/1","https://x.test/item/2"]. Relative links stay relative, so add the site address yourself, for example{{ $json.link.startsWith('http') ? $json.link : 'https://example.com' + $json.link }}. With the Attribute field left empty, the node returned an object with all attributes ({"href":"/item/1"}) instead of a string. Return Value Value read an<input>value ("abc"). Return Value HTML returned the inner HTML of the first match, with entities kept and spaces not trimmed (" Hello & welcome ").Tables lose their rows
Extracting
trwith Return Array gave["nv","a1","b2"]: the cells of each row glued together with nothing between them. Extractingtdgave one flat list,["a","1","b","2"], so you can't tell which cell belongs to which row. Two ways out: extract each column separately withtd:nth-child(1),td:nth-child(2)and pair them by position, or extract the rows with Return Value HTML and run a second HTML node (or a Code node) on each row.Your other fields disappear
With 2 input items the node returned 2 items, one per input, but each held only the extraction keys: the original fields (URL, ID and so on) were gone. Reference them from the earlier node, for example
{{ $('HTTP Request').item.json.url }}, or join them back with a Merge node by position.Odd text: line breaks, uppercase headings, broken accents, input errors
In HTML node v1.2,
line1<br>line2became"line1\nline2"; the old v1 node gave"line1line2", words glued. Taking the text of a large container such asbodyreturned plain-text style output: headings in capitals (HELLO & WELCOME), links written asOne [/item/1], and blank lines between blocks. Use Skip Selectors (we used.ad,table) to leave parts out, or target smaller elements. A Latin-1 page read from a binary file came out asCaf� Zo�with no error, because the bytes are read as UTF-8. Bad input fails with unclear messages:nullgavecheerio.load() expects a stringand a number gaveCannot create property 'prev' on number '123'. An empty string just returned"".
What we ran
On 24 October 2026 we ran 32 executions on n8n 2.43.7 with n8n execute: a Manual Trigger, a Code node that put a small HTML page into the JSON field data or the binary field data, the HTML node v1.2 with the operation Extract HTML Content (one run on v1), and a No Op node after it.
| Setup | Result |
|---|---|
h1, default options | Hello & welcome: entities decoded, spaces trimmed |
Page built by JavaScript (empty <div id="app">, data in a <script>) | Every key "", run shows success |
| Selector matching 2 elements, Return Array off | Only the first match: "One" |
| Same, Return Array on | ["One","Two"] |
Return Value Attribute, Attribute href, Return Array on | ["/item/1","https://x.test/item/2"]: relative links stay relative |
| Return Value Attribute, Attribute field left empty | An object of all attributes, {"href":"/item/1"}, not a string |
| Selector that matches nothing | "" (Return Array off) or [] (on), no error |
JSON Property body, HTML is in data | No property named "body" exists! |
| Source Data JSON, HTML is a binary file (HTTP Request with File response) | No property named "data" exists! |
| Same, Source Data Binary | Works |
JSON Property points to an object ({data: {html: ...}}) | Every key "", run shows success |
JSON Property body.html (dot notation) | Works |
<p>line1<br>line2</p>, HTML node v1.2 | "line1\nline2" |
| Same, HTML node v1 | "line1line2": words glued together |
Text of body with Skip Selectors .ad,table | Ad and table skipped; headings UPPERCASED (HELLO & WELCOME), links as One [/item/1] |
Return Value Value on an <input> | "abc" |
Return Value HTML on .p | Inner HTML of the first match |
Return Value HTML on h1 | " Hello & welcome ": entities kept, not trimmed |
| 2 input items | 2 output items, but only the extraction keys: the original fields are gone |
tr with Return Array | ["nv","a1","b2"]: cells glued with no separator |
td with Return Array | ["a","1","b","2"]: row structure lost |
.p:nth-child(3) a, a:contains('Two'), .price:eq(1) | All work: Two, Two, $20 |
XPath //h1 | Empty sub-selector |
Invalid CSS div[ | Expected name, found |
| Empty string as input | "", no error |
null as input | cheerio.load() expects a string |
Number 123 as input | Cannot create property 'prev' on number '123' |
| No extraction values defined | Output {"":""} |
| Empty CSS Selector | "" |
div.p a span (the span is next to the link, not inside it) | ""; .p > .price works |
Upper-case tag <H1>, selector h1 | Matches: tag names ignore case |
class="Big", selector .big | "": class names are case-sensitive |
| Latin-1 page read from binary | Caf� Zo�: broken accents, no error |
Quick checklist
- Everything empty? Check that the text is in the raw HTML; JavaScript-built pages need their API instead.
- One value instead of a list? Turn on Return Array.
No property named "data" exists!? Use Source Data Binary for files, or set JSON Property to the field that holds the HTML string.Empty sub-selector? That was XPath; use a CSS selector.- Selector finds nothing? Check class-name case and nesting.
- Links without the domain? Add the base URL.
- Table data jumbled? Extract columns with
:nth-childor rows as HTML. - Lost your input fields? Reference the earlier node or merge by position.
Good to know
- Turning the extracted text into Markdown, or Markdown into HTML for an email? See n8n Markdown node not working.
- Parsing an XML feed or API instead of a web page? Use the XML node, see n8n XML node not working.
- Fetching the page first? See n8n HTTP Request node errors, and for many pages HTTP Request pagination. Turning a list into items: Split Out, Aggregate and Summarize. Undefined values in expressions: n8n expression errors.
- Every error message we reproduced is in the n8n error message index.
What we didn't test
- The editor UI itself (we ran workflows from JSON), n8n Cloud, live websites, very large pages, and the Trim Values option on its own.
Start from a working agent
FAQ
Why does the n8n HTML node return empty strings?
Most often the page is built by JavaScript, so the text is not in the HTML the server sent, or the selector does not match (class names are case-sensitive). The node raises no error in either case. Check the raw response of the HTTP Request node first.
Why does the n8n HTML node return only the first element?
Return Array is off by default, so only the first match is returned. Turn on Return Array in that extraction value to get every match as a list.
What does 'No property named "data" exists!' mean in the n8n HTML node?
Source Data is JSON but the item has no JSON field with that name, often because the HTTP Request node saved the page as a binary file. Set Source Data to Binary, or set JSON Property to the field that holds the HTML text.
Can I use XPath in the n8n HTML node?
No. It uses CSS selectors. An XPath such as //h1 failed with "Empty sub-selector" in our test. Use the CSS equivalent, such as h1, and pseudo-selectors like :nth-child or :contains.
How do I scrape links with the n8n HTML node?
Set Return Value to Attribute, Attribute to href and turn on Return Array. Relative links like /item/1 come back as they are, so add the site address in a later expression.
Related guides
- n8n Extract From File (CSV) not working: delimiter, BOM, encoding and errors, 32 runs
- n8n Convert to File not working: empty CSV, lost fields and broken base64, 38 runs
- n8n Compression node not working: zip, unzip, file_0 and invalid zip data, 42 runs
- n8n Data Table node not working: unknown column, types, upsert, 78 runs
- n8n Simple Vector Store not working? 23 tests, every error decoded
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes