Reference · Tools
HTML node
Generate HTML from templates with expression placeholders, extract data from HTML using CSS selectors, convert JSON items to an HTML table, and optionally output HTML as a binary file.
The HTML node does three related jobs: render HTML from a template with `{{ }}` placeholders, extract values out of HTML with CSS selectors, and turn JSON items into an HTML table — optionally emitting the result as a binary .html file. It needs no credentials. A typical build is rendering a personalised email body per item and handing it straight to an email node.
- Works as
- Action (binary)
- Tool name
html- Operations
- 3 — Generate HTML Template , Extract HTML Content , Convert to HTML Table
- Parameters
- 12
- Outputs
- Output, Error
- Credentials
- None required
What you can build with HTML
- Generate an HTML email template with dynamic data.
- Convert workflow results to a styled HTML table.
- Extract titles and links from an HTML page using CSS selectors.
- Create an HTML report as a downloadable .html file.
- Parse HTML from a binary file and extract structured data.
Overview
The HTML tool provides three operations: (1) generateHtmlTemplate — takes an HTML template with {{ expression }} placeholders, resolves them against the input item data context, and outputs the rendered HTML as JSON or optionally as a binary .html file; (2) extractHtmlContent — parses HTML from a JSON property or binary data field and extracts values using CSS selectors (supports text, html, attribute, and value extraction with array/single return modes); (3) convertToHtmlTable — aggregates all input items into a single HTML table element with configurable styling, headers, captions, and attributes. No external API credentials required.
Node Type
Action (Binary) — handles file/binary data operations
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool does not require any credentials.
Operations
| Operation | Value | Description |
|---|---|---|
| Generate HTML Template | generateHtmlTemplate | Render an HTML template with expression placeholders resolved against item data |
| Extract HTML Content | extractHtmlContent | Extract values from HTML using CSS selectors |
| Convert to HTML Table | convertToHtmlTable | Aggregate all input items into a single HTML table |
Parameters
Generate HTML Template
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| HTML Template | string | No | <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>My HTML document</title> </head> <body> <div class="container"> <h1>This is an H1 heading</h1> <h2>This is an H2 heading</h2> <p>This is a paragraph</p> </div> </body> </html> | HTML template with {{ expression }} placeholders. Expressions are evaluated against the current item data context. Use {{ $json.fieldName }} to reference input fields. |
| Output as Binary | boolean | No | false | Whether to output the rendered HTML as a binary .html file instead of a JSON property. |
| Binary Property | string | No | data | Name of the binary property to write the HTML file to. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Output as Binary is true) |
| File Name | string | No | output.html | File name for the binary HTML output. (shown when Output as Binary is true) |
Extract HTML Content
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Source Data | options | No | json | Whether HTML should be read from binary data or a JSON property. |
Options: binary (read HTML from a binary data property), json (read HTML from a JSON property on the item) | ||||
| Input Binary Field | string | Yes | data | The name of the input binary field containing the HTML file to be extracted. (shown when Source Data is binary) |
| JSON Property | string | Yes | data | Name of the JSON property containing the HTML to extract data from. Supports dot-notation (e.g., “response.body”). Can be a string or array of strings. (shown when Source Data is json) |
| Extraction Values | fixedCollection | No | {"values":[{"key":"","cssSelector":"","returnValue":"text","returnArray":false}]} | Define one or more extraction rules. Each rule uses a CSS selector to find elements and extracts the specified data. |
Options: attribute | ||||
| — Key | string | No | — | The key under which the extracted value should be saved in the output JSON. |
| — CSS Selector | string | No | — | The CSS selector to match HTML elements (e.g., “h1”, “.price”, “#main a”, “table tr td:nth-child(2)”). |
| — Return Value | options | No | text | What kind of data should be returned from matched elements. |
Options: attribute (get an attribute value like “class” from an element), html (get the inner HTML the element contains), text (get only the text content of the element), value (get value of an input, select, or textarea element) | ||||
| — Attribute | string | No | — | The name of the attribute to return the value of (e.g., “href”, “src”, “data-id”). (shown when Return Value is attribute) |
| — Skip Selectors | string | No | — | Comma-separated list of selectors for elements to skip/remove during text extraction. (shown when Return Value is text) |
| — Return Array | boolean | No | false | Whether to return values as an array. If true, each matched element produces a separate array entry. If false, all matched text is concatenated into a single string. |
Options (options) | collection | No | {} | |
| — Trim Values | boolean | No | true | Whether to automatically remove spaces and newlines from the beginning and end of extracted values. |
| — Clean Up Text | boolean | No | true | Whether to remove leading/trailing whitespace, line breaks, and condense multiple consecutive whitespaces into a single space. |
Convert to HTML Table
| Parameter | Type | Required | Default | Description | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Options (tableOptions) | collection | No | {} | |||||||||||||||||||||||||||||||||||
| — Capitalize Headers | boolean | No | false | Whether to capitalize header names by splitting on underscores (e.g., “first_name” becomes “First Name”). | ||||||||||||||||||||||||||||||||||
| — Custom Styling | boolean | No | false | When true, no default inline styles are applied. When false, applies built-in styles for a clean default appearance. | ||||||||||||||||||||||||||||||||||
| — Caption | string | No | — | Optional caption text for the table. | ||||||||||||||||||||||||||||||||||
| — Table Attributes | string | No | — | Raw HTML attributes to add to the element.
element.
element.
All Operations
Output DataGenerate HTML TemplateOne output item per input item. The rendered markup is written to
With Output as Binary off, Extract HTML ContentOne output item per HTML string parsed. The extracted values are added to the input item’s JSON, each under its rule’s Key:
Convert to HTML TableOne output item for the whole node run, whatever the input count. The item JSON holds a single field:
The column headers are the union of the keys found on the input items, and nothing from the input JSON is carried onto the output item. No binary is produced — pass the result to Convert to File if you need a downloadable Example ConfigurationRender a simple template from item fields:
Render a full document and save it as a downloadable file:
Extract a title, every link and the paragraph text from an HTML string on the item:
Extract from an uploaded HTML file instead:
Scrape several fields out of a fetched page body:
Build a fully styled table from every input item:
Build a table with the built-in default styling:
Error Handling
TipsThis tool generates HTML from templates, extracts data from HTML using CSS selectors, and converts JSON items into an HTML table. It is ideal when you need to dynamically create HTML content, parse existing HTML for specific information, or present structured data in a tabular HTML format. The tool produces rendered HTML as JSON, extracted data as JSON, or an HTML table as JSON, with an option to output generated HTML as a binary .html file. Common Patterns
Parameter Dependencies
Notes
|
Frequently asked questions
How do I build a personalised email body?
Use the template mode with expression placeholders such as `{{ $json.firstName }}`, which are resolved per item, then pass the rendered HTML to an email node.
How do I scrape a page with this?
Chain HTTP Request into the extract mode, point JSON Property at the response body, and define one extraction rule per field you want. Each rule maps a CSS selector to an output key.
Can it turn query results into a table?
Yes — feed items into Convert to HTML Table, and turn on Capitalize Headers if you want the column names tidied for a report.
Does it need credentials?
No. Everything it does is local transformation, so there is nothing to authenticate.
Build with the HTML node
Drop it into a workflow, wire it to an agent, or call it on a schedule.
Open BusyBotLast reviewed . Spotted something wrong? Tell us.