HTML Reader task
On this page
Use HTML document reader for selected article or help-page text without treating markup as prose. Select a containing section when nearby headings and structure matter; a narrow selector omits unrelated content and headings.
|
Field |
Required |
Default and behavior |
|---|---|---|
|
Character set |
No |
Blank uses UTF-8. Inline text requires UTF-8; files can use another supported encoding. |
|
HTML selector |
No |
Blank uses |
|
Text separator |
No |
A newline joins selected text; explicit empty text joins without a separator. Ignored when grouping or reading all body text. |
|
Read all body text |
No |
Unchecked (default). Check to return body text, overriding selector, grouping and separator. |
|
One document per selected element |
No |
Unchecked (default). Check to separate selected elements and ignore separator; otherwise selected text is combined. |
|
Include link URLs |
No |
Unchecked (default). Check to retain the link array as JSON text in |
|
Metadata tags |
No |
Defaults to |
For a page containing separate articles, select article and enable one document per selected element. Read all body text instead when one combined body document is wanted. The task does not crawl links or fetch subresources. metadata.linkUrls can contain the JSON string ["https://example.com/help",""]; an empty entry can represent an unresolved relative link. Correct invalid selectors/encodings and inspect selected content if output is empty. Selection is not a redaction or access-control boundary.
With Read all body text off, a selector that matches nothing produces one document with empty text in combined mode. With one document per selected element enabled, it produces no documents instead.
Overlapping selected elements can repeat text and make a combined result much larger than the source. The ordinary result-file allowance still applies. If the complete result does not fit, reading fails without publishing a partial documents file; select less content or provide smaller sources before retrying.
Example
Use document reader basics for the required Source expression, captured input, retry and routing. Options belong directly on this task; its JSON type is HtmlDocumentReader.
- Select HTML Reader Task and open Configuration.
- Enter
${source}in Source expression andarticlein HTML selector. - Enable One document per selected element for the article-by-article output in this example.
- Map the HTML into
sourceon Input Parameters.
Input
Captured task data after Input Parameters mapping:
{
"source": "<article><h1>Refunds</h1><p>Available within 30 days.</p></article>"
}
Output
The task returns the shared always-file documents.json output, not inline records. Source, result-file and storage limits still apply for zero or one record.
Raw task output:
{
"swf:file": {
"id": "3AbCdEfGhIjKlMnOpQrStU",
"workflowId": "4AbCdEfGhIjKlMnOpQrStU",
"taskId": "5AbCdEfGhIjKlMnOpQrStU",
"contentType": "application/json",
"fileName": "documents.json",
"sizeInBytes": 254,
"createdOn": "2026-10-22T00:00:00Z"
}
}
A following task can map the attachment with ${['Read Html'].output['swf:file']}.