Skip to content
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

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.

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

When Use config from message is disabled, configure the same fields statically in the node settings.

  1. Load the report configuration from message data or static settings.
  2. Submit the report generation task asynchronously to the reports service.
  3. On completion: add the generated report ID to message metadata under the reports key; route via Success.
  4. On error (invalid config, template/user not found, submission failure): route via Failure.
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.
{
"$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" }
}
}
}
}