HTML output mapper

The HTML output mapper node renders a single HTML template into a page.

The HTML output mapper node renders a single HTML template into a page. Use it when the caller is a browser rather than an API client — the workflow answers with text/html instead of JSON.

Overview

PropertyValue
Inputs1
Outputs0 (sink)
Runtime output{ "html": "…", "statusCode": 200, "contentType": "text/html; charset=utf-8" }

Parameters

ParameterTypeDescription
labelstringNode identifier (camelCase)
htmlstringThe page template. $nodeLabel.field expressions are interpolated in place.
statusCodenumberHTTP status for the response (default 200)
contentTypestringResponse content type (default text/html; charset=utf-8)

Webhook and run behavior

When this node is the only terminal output of the workflow, the execute endpoint responds with the rendered page, the configured status code, and the configured content type — no JSON envelope, no label wrapper.

Two things turn that off:

  • A second terminal node. With another active terminal in the graph, Heym falls back to the normal per-label JSON map and the page arrives as a string field.
  • X-Simple-Response: false. That header asks for the full envelope with status, node_results, and timings, which is what the editor's canvas uses. Send it when you are debugging a page workflow.

Serving a page to a browser

Set the workflow's request method to GET in the cURL dialog so a plain browser navigation reaches it. A GET request carries no body, so inputs come from the query string:

curl -X GET "https://your-host/api/workflows/<workflow-id>/execute?name=Ada"

Read those values with $input.query.name. See Webhooks for the full method contract.

Set the workflow's auth to Anonymous for a page people open from a link. A browser navigation cannot send an Authorization header, so a JWT or Header Auth workflow answers 401 there, even for a signed-in member. An Anonymous page runs in the owner's context, with the owner's credentials and global variables, even when the visitor is signed in to Heym. See Who counts as the caller.

A workflow with no trigger node whose only terminal is this node shows a WEB chip in the Workflows tab.

Pages run sandboxed

Every page response carries Content-Security-Policy: sandbox … and X-Content-Type-Options: nosniff, whatever contentType you set. Scripts, forms, popups, dialogs and downloads still work, but the page gets an opaque origin: it cannot read cookies or localStorage, and it cannot call the Heym API with the session of whoever opens it. A page that needs data should get it from the workflow (template expressions such as $llm.text), not by calling /api/… from its script.

On a dashboard

To show HTML inside a dashboard widget, use a Chart Output node with chart type HTML instead. Its html field takes the same template and resolves expressions the same way; the widget runs it in a sandboxed frame without network access.

Agent tool usage

Not supported. This node is a terminal sink, so it cannot be attached to an Agent Node tools handle. The same applies to JSON output mapper.

Loop restriction

Same rule as Output: do not place this node inside a loop iteration branch—only after the loop done branch. See Loop.

Example

{
  "type": "htmlOutputMapper",
  "data": {
    "label": "reportPage",
    "html": "<!doctype html><html><body><h1>$llm.text</h1><p>Generated by Heym</p></body></html>",
    "statusCode": 200,
    "contentType": "text/html; charset=utf-8"
  }
}
  • JSON output mapper – Same idea for API clients expecting JSON
  • Chart Output – The same template as a sandboxed dashboard widget
  • Output – Message or schema-based response with result wrapping
  • Webhooks – Execute endpoint, request methods, and responses
  • Node Types – All node types