Generate Dashboard Report
Use this node to capture a screenshot of a ThingsBoard dashboard using a headless browser and save it as a blob entity — for example, generating a PDF or PNG snapshot of a live dashboard to attach to an email report, or archiving a visual record of device state at the time of an alarm.
Configuration
Section titled “Configuration”- Use system reports server — when enabled, uses the system-configured reports server endpoint. When disabled, specify a Reports server endpoint URL directly in this node.
- Use report config from message — when enabled, reads the report configuration from the incoming message data under the
reportConfigkey.
Static report config fields
Section titled “Static report config fields”| Field | Description |
|---|---|
baseUrl | Base URL of the ThingsBoard instance |
dashboardId | UUID of the dashboard to capture |
timezone | Timezone for rendering time-based widgets |
namePattern | File name pattern for the saved blob |
userId | UUID of the user whose session is used to render the dashboard |
type | Output format: PDF, PNG, or JPEG |
Message processing algorithm
Section titled “Message processing algorithm”- Load the report configuration from message data or static settings.
- Submit the dashboard capture request to the reports server.
- Save the screenshot as a blob entity.
- Append the blob ID to message metadata under the
attachmentskey. - Route via
Success. - On error (invalid config, server unreachable, capture failure, user not found): route via
Failure.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Screenshot captured and saved; blob ID appended to attachments metadata key. |
Failure | Invalid config, reports server unreachable, capture failed, user not found, or unexpected error. |
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbGenerateDashboardReportNodeConfiguration", "type": "object", "additionalProperties": false, "properties": { "useSystemReportsServer": { "type": "boolean" }, "reportsServerEndpointUrl": { "type": "string" }, "useReportConfigFromMessage": { "type": "boolean" }, "reportConfig": { "type": "object", "properties": { "baseUrl": { "type": "string" }, "dashboardId": { "type": "string" }, "timezone": { "type": "string" }, "namePattern": { "type": "string" }, "userId": { "type": "string" }, "type": { "type": "string", "enum": ["PDF", "PNG", "JPEG"] } } } }}