Generate Report
Use this node to generate a report from a report template and optionally notify recipients — for example, automatically emailing a monthly energy consumption report to facility managers, or producing an on-demand PDF report triggered by an alarm.
Configuration
Section titled “Configuration”Report config from message
Section titled “Report config from message”When enabled (Use config from message), all report parameters are read from the incoming message data:
| Field | Description |
|---|---|
reportTemplateId | UUID of the report template to use |
userId | UUID of the user whose credentials are used for report generation |
timezone | Timezone for rendering time-based charts |
targets | Array of recipient group UUIDs to notify with the report |
notificationTemplateId | UUID of the notification template used to deliver the report |
Static config
Section titled “Static config”When Use config from message is disabled, configure the same fields statically in the node settings.
Message processing algorithm
Section titled “Message processing algorithm”- Load the report configuration from message data or static settings.
- Submit the report generation task asynchronously to the reports service.
- On completion: add the generated report ID to message metadata under the
reportskey; route viaSuccess. - On error (invalid config, template/user not found, submission failure): route via
Failure.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Report generated; reports metadata key set to the generated report ID. |
Failure | Invalid config, template or user not found, task submission failure, or unexpected error. |
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbGenerateReportV2NodeConfiguration", "type": "object", "additionalProperties": false, "properties": { "useConfigFromMessage": { "type": "boolean", "default": false }, "config": { "type": "object", "required": ["reportTemplateId", "userId", "timezone"], "properties": { "reportTemplateId": { "type": "object" }, "userId": { "type": "object" }, "timezone": { "type": "string" }, "targets": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "notificationTemplateId": { "type": "object" } } } }}