- Notification options available in ThingsBoard
- Send notification
- Inbox
- Sent
- Recipients
- Templates
- Rules
The ThingsBoard Notification center is a comprehensive tool for sending, managing, and automating notifications within the platform. It allows for a variety of notification methods, including web, email, mobile application, SMS, and integrations with Slack and Microsoft Teams. Users can manually send notifications, automate them through REST API, or set triggers based on events within the system. Users may also schedule delivery of the notification for a particular time.
The Notification center is accessible through the sidebar menu and includes options for sending notifications, viewing inbox and sent messages, managing recipients, creating templates, and setting up rules for automated notifications.
Letâs look at each of the key components of the notification center below.
Notification options available in ThingsBoard
Each notification may be delivered using multiple delivery methods: Web, Mobile app, SMS, Email, Slack or Microsoft Teams.
- Web. The notification will be sent to the Web UI in Thingsboard;
- Mobile app. The notification will be sent to the ThingsBoard Mobile Application;
- SMS. The notification is sent to the userâs phone. To send notifications via SMS, a system administrator should set up the SMS provider properly;
- Email. With this approach, the user receives a notification by Email. To send notifications via Email, a tenant administrator outgoing mail server should be configured;
- Slack. Notifications will send as a Slack message to the list of Users or Channels. To send notifications via Slack, a tenant administrator must configure a Slack API token in the âSettingsâ -> âNotificationsâ tab. Learn more about how to configure Slack settings in Thingsboard here.
- Microsoft Teams. Notifications will send as a Microsoft Teams message to the list of channels. To send notifications via Microsoft Teams, a tenant administrator must get webhook URL for a needed channel using this guide.
Send notification
To send a notification manually, follow these steps:
- Click the "Send notification" button in the upper right corner of the "Notification center" page to open the new notification wizard;
- Select recipients and one or more delivery methods. In this example, let's consider the Web delivery method;
- If necessary, use the scheduler. Click "Next";
- Enter subject and text of the message;
- You can use the action button in the notification. Enter the button text, select the action type ("Open dashboard" or "Open URL link") and specify the URL link or dashboard that should open when the button is clicked. You can also display the icon in the notification and set its color. Click "Next";
- In this window, you can see how the notification will look and also view the list of notification recipients. Click "Send";
- The user received a new notification and can view it on the Notification center page or by clicking on the bell icon in the upper right corner of the screen;
- By clicking on the "Open this dashboard" button in the message, the user will open the dashboard window.
Inbox
The âInboxâ tab displays unread notifications by default. You may use the inbox table to browse the notifications and mark them as read. You may also switch the view to browse all notifications.
You can also view incoming notifications by clicking on the bell icon in the top right corner of the screen. The number next to the icon indicates the number of unread messages. Here you can read the notification, mark it as read, or take action by clicking the action button.
Sent
The âSentâ tab displays sent notifications and their status. You can use the âNotify againâ button to send notification again. You can also delete notifications by clicking the âdeleteâ icon.
Also, you may investigate issues with the delivery of certain notifications here. In case of delivery issues, the corresponding notification row will have information about the recipient who missed the update. This typically happens when the email address is wrong, or the phone number is not configured.
If you decide to delete an outgoing message, it will also be deleted for all recipients. This only applies to the Web delivery method.
Recipients
The âRecipientsâ tab displays the list of notification recipients. Here you can create and delete notification recipients here.
Add new recipient
To add notification recipients, follow these steps:
- Click the âAdd recipientsâ button in the upper right corner of the âRecipientsâ tab;
- In the new window, enter the name of the notification recipients;
- Select one of the three types of recipients: platform users, Microsoft Teams, or Slack entities;
- In the âUser filterâ list, select who you want to send notifications to;
- Click âAddâ;
You can also add a new recipient at the stage of creating a new notification:
- Start creating a new notification. In the âNew notificationâ window (in the âRecipientsâ field) click the âCreate newâ button;
- Enter the name of the notification recipients;
- Select one of the three types of recipients: platform users, Microsoft Teams or Slack entities;
- In the âUser filterâ list, select who you want to send notifications to;
- Click âAddâ.
Platform users
There are several user filters that help you to define a recipient group. The scope of the filter depends on the role of the user that creates the recipient group.
For System Administrator:
-
All users - all users of the platform. Includes all tenant administrators and all customer users;
-
Tenant administrators - set of tenant administrator users that are selected based on the list of tenants or their tenant profiles;
-
Affected tenant administrators;
-
System administrators.
For Tenant Administrator:
-
All users - all users of the current tenant. Includes the tenant administrator and all customer users;
-
Tenant administrators - all administrators of the current tenant;
-
User list - selected users;
-
Customer users - all users that belong to customers of the current tenant;
-
Users of the entity owner - all users that belong to the entity owner. For example, users of the customer that owns the device or tenant administrators if the device is not assigned to the customer;
-
Affected user - The user that is affected by the notification trigger event. For example, the person that is assigned to investigate the alarm event.
Slack entities
As a platform user, you may send notifications as a Slack message to a list of Users or Channels. Both public and private channels and direct messages are supported.
Microsoft Teams
As a platform user, you may send notifications as a Microsoft Teams message to a list of Ńhannels.
To send notifications via Microsoft Teams, get your webhook URL for a needed channel using this guide.
Then add new notification recipients group.
Templates
The âTemplatesâ tab displays the list of notification templates. You may create, copy and delete notification templates here.
The template defines the content of the notification and the set of delivery methods to use. Each template contains a notification subject and message. The user may adjust the notification content for specific delivery methods. For example, you may use a concise message for SMS and an advanced HTML template for the Email.
Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. See the available types and parameters below.
Parameter names must be wrapped using ${...}
. For example: ${recipientFirstName}
.
You may also modify the value of the parameter with one of the sufixes:
upperCase
, for example -${recipientFirstName:upperCase}
lowerCase
, for example -${recipientFirstName:lowerCase}
capitalize
, for example -${recipientFirstName:capitalize}
Add new template
To add a new template, follow these steps:
- Click the âAdd templateâ button in the upper right corner of the âTemplatesâ tab;
- In the new window, enter the notification template name;
- Select a template type from the drop-down list;
- Next, select one or more delivery methods. In this example, letâs consider the Web delivery method. Click âNextâ;
- Enter the subject and text of the message;
- Optionally, you can display the icon in the notification and set its color. Also, you can use the action button in the notification;
- Click âAddâ.
General
The general template is used to send generic notifications. For example, system maintenance or important announcement. Available template parameters:
- recipientTitle - title of the recipient (first and last name if specified, email otherwise);
- recipientEmail - email of the recipient;
- recipientFirstName - first name of the recipient;
- recipientLastName - last name of the recipient.
Alarm
The alarm template is used to send notification about alarms. For example, alarm creation or acknowledgment. Available template parameters contain all parameters available for the General template, plus:
- alarmType - alarm type;
- action - one of: âcreatedâ, âseverity changedâ, âacknowledgedâ, âclearedâ, âdeletedâ;
- alarmId - the alarm id as uuid string;
- alarmSeverity - alarm severity (lower case);
- alarmStatus - the alarm status;
- alarmOriginatorEntityType - the entity type of the alarm originator, e.g. âDeviceâ;
- alarmOriginatorName - the name of the alarm originator, e.g. âSensor T1â;
- alarmOriginatorId - the alarm originator entity id as uuid string.
Device activity
The device activity template is used to send notification about inactive devices. Available template parameters contain all parameters available for the General template, plus:
- deviceId - the device id as uuid string;
- deviceName - the device name;
- deviceLabel - the device label;
- deviceType - the device type;
- eventType - one of: âinactiveâ, âactiveâ.
Entity action
The entity action template is used to send notification about entity action: creation, update or deletion. Available template parameters contain all parameters available for the General template, plus:
- entityType - the entity type, e.g. âDeviceâ;
- entityId - the entity id as uuid string;
- entityName - the name of the entity;
- actionType - one of: âaddedâ, âupdatedâ, âdeletedâ;
- userId - id of the user who made the action;
- userEmail - email of the user who made the action;
- userFirstName - first name of the user who made the action;
- userLastName - last name of the user who made the action.
Alarm comment
The alarm comment template is used to send notification about comments on alarms. Available template parameters contain all parameters available for the Alarm template, plus:
- comment - text of the comment;
- action - one of: âaddedâ, âupdatedâ;
- userEmail - email of the user who made the action;
- userFirstName - first name of the user who made the action;
- userLastName - last name of the user who made the action.
Alarm assignment
The alarm assignment template is used to send notification when alarm is assigned or unassigned. Available template parameters contain all parameters available for the Alarm template, plus:
- assigneeEmail - email of the assignee;
- assigneeFirstName - first name of the assignee;
- assigneeLastName - last name of the assignee;
- assigneeId - the id of the assignee as uuid string;
- userEmail - email of the user who made the action;
- userFirstName - first name of the user who made the action;
- userLastName - last name of the user who made the action;
- action - one of: âassignedâ, âunassignedâ.
Rule engine lifecycle event
The rule engine lifecycle event template is used to send notification about rule chain or rule node lifecycle events. For example, notify when new rule node fails to start. Available template parameters contain all parameters available for the General template, plus:
- componentType - one of: ârule chainâ, ârule nodeâ;
- componentId - the component id as uuid string;
- componentName - the rule chain or rule node name;
- ruleChainId - the rule chain id as uuid string;
- ruleChainName - the rule chain name;
- eventType - one of: âstartedâ, âupdatedâ, âstoppedâ;
- action - one of: âstartâ, âupdateâ, âstopâ;
- error - the error text.
Rule node
The rule node template is used to send notifications from the âsend notificationâ rule node. You may use data or metadata from the incoming message to build the notification subject and body. Available template parameters contain all parameters available for the General template, plus:
- values from the incoming message metadata referenced using the metadata key name;
- values from the incoming message data referenced using the data key name;
- originatorType - type of the originator, e.g. âDeviceâ;
- originatorId - id of the originator;
- msgType - type of the message;
- recipientEmail - email of the recipient;
- recipientFirstName - first name of the recipient;
- recipientLastName - last name of the recipient.
Edge connection
The Edge connection template is used to send notifications about changes in the connection status between ThingsBoard and the Edge.
Available template parameters:
- edgeId - the edge id as uuid string;
- edgeName - the name of the edge;
- eventType - the string representation of the connectivity status: connected or disconnected.
Edge communication failure
The Edge communication failure template is used to send notifications about communication failures occur.
Available template parameters:
- edgeId - the edge id as uuid string;
- edgeName - the name of the edge;
- failureMsg - the string representation of the failure, occurred on the Edge.
Entities limit
The system administrator uses the entities limit template to notify tenants that they will reach the limit on the number of entities (devices, assets, etc.). Available template parameters contain all parameters available for the General template, plus:
- entityType - one of: âDeviceâ, âAssetâ, âUserâ, etc.;
- currentCount - the current count of entities;
- limit - the limit on number of entities;
- percents - the percent from the notification rule configuration;
- tenantId - id of the tenant;
- tenantName - name of the tenant.
API usage limit
The system administrator uses the API usage limit template to notify tenants when they hit a specific API limit. Available template parameters contain all parameters available for the General template, plus:
- feature - API feature for which the limit is applied; one of: âDevice APIâ, âTelemetry persistenceâ, âRule Engine executionâ, âJavaScript functions executionâ, âEmail messagesâ, âSMS messagesâ, âAlarmsâ;
- status - one of: âenabledâ, âwarningâ, âdisabledâ;
- unitLabel - name of the limited unit; one of: âmessageâ, âdata pointâ, âRule Engine executionâ, âJavaScript executionâ, âemail messageâ, âSMS messageâ, âalarmâ;
- limit - the limit on used feature units;
- currentValue - current number of used units;
- tenantId - id of the tenant;
- tenantName - name of the tenant.
New platform version
The system administrator uses the new platform version template to notify tenants of the release of a new version of the Thingsboard platform. Available template parameters contain all parameters available for the General template, plus:
- latestVersion - the latest platform version available;
- latestVersionReleaseNotesUrl - release notes link for latest version;
- upgradeInstructionsUrl - upgrade instructions link for latest version;
- currentVersion - the current platform version;
- currentVersionReleaseNotesUrl - release notes link for current version.
Rules
Notification rules allow you to automate the delivery of notifications on a particular trigger event. For example, rule automatically sends a notification when a new alarm is created. The trigger event types are tightly coupled to the notification template types. Letâs review them below:
Alarm
The âAlarmâ rule sends notifications on specific events: alarm is created, acknowledged, cleared, severity updated, or alarm deleted.
To create a new alarm rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Alarm;
- Then, select Template from the list or create your own;
- Build an escalation chain. The escalation chain allows you to configure multiple recipients of the notification. The first recipient group will receive the notification immediately. Other recipient groups will receive the notification after a configurable delay. You may also configure alarm statuses, which will stop the escalation chain. Click âNextâ;
- The alarm trigger filter allows you to filter events based on alarm type and severity;
- You may also select the event types that will trigger notification;
- Click âAddâ.
Default rule
The default rule âNew alarmâ will notify tenant administrators when an alarm is created.
Template subject: New alarm '${alarmType}'
Template message: Severity: ${alarmSeverity}, originator: ${alarmOriginatorEntityType} '${alarmOriginatorName}'
See Alarm template for a list of the available template parameters.
Device activity
The âDevice activityâ rule sends notifications when device becomes active or inactive.
To create a new device activity rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Device activity;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to configure specific devices or device types;
- You may also select the event types that will trigger notification;
- Click âAddâ.
Default rule
The default rule âDevice activity status changeâ will notify tenant admins when any device changes its activity state
Template subject: Device '${deviceName}' became ${eventType}
Template message: Device '${deviceName}' of type '${deviceType}' is now ${eventType}
See Device activity template for a list of the available template parameters.
Entity action
The âEntity actionâ rule sends notifications when entity is created, updated or deleted.
To create a new entity action rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Entity action;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter events by entity type;
- You may also select the event types that will trigger notification;
- Click âAddâ.
Default rule
The default rule âDevice createdâ will notify tenant administrators when device is created.
Template subject: ${entityType} was ${actionType}
Template message: ${entityType} '${entityName}' was ${actionType} by user ${userEmail}
See Entity action template for a list of the available template parameters.
Alarm comment
The âAlarm commentâ rule sends notifications when alarm is commented.
To create a new alarm comment rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Alarm comment;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter alarms by type, severity, and status;
- You may also select to notify only on user comments and skip system comments. Optionally, you may notify users on comments update;
- Click âAddâ.
Default rule
The default rule âComment on active alarmâ will notify tenant administrators when comment is added by user on active alarm.
Template subject: Comment on '${alarmType}' alarm
Template message: ${userEmail} ${action} comment: ${comment}
See Alarm comment template for a list of the available template parameters.
Alarm assignment
The âAlarm assignmentâ rule sends notifications when alarm is assigned or unassigned.
To create a new alarm assignment rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Alarm assignment;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter alarms by type, severity, and status;
- You may also select the event types that will trigger notification: assign or unassign;
- Click âAddâ.
Default rule
The default rule âAlarm assignmentâ will notify a user when any alarm was assigned to him.
Template subject: Alarm '${alarmType}' (${alarmSeverity}) was assigned to user
Template message: ${userEmail} assigned alarm on ${alarmOriginatorEntityType} '${alarmOriginatorName}' to ${assigneeEmail}
See Alarm assignment template for a list of the available template parameters.
Rule engine lifecycle event
The âRule engine lifecycle eventâ rule sends notifications about the rule chain or rule node lifecycle events. For example, notify when a new rule node fails to start (typically due to misconfiguration).
Trigger settings: the trigger filter allows you to filter based on rule chains and events status: Started, Updated, Stopped.
To create a new Rule engine lifecycle event rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Rule engine lifecycle event;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter notifications by type, severity, and status;
- You may also select the event types that will trigger notification: assign or unassign;
- Click âAddâ.
Default rule
The default rule âRule node initialization failureâ will notify tenant administrators when any Rule chain or Rule node failed to start, update or stop.
Template subject: ${action:capitalize} failure in Rule chain '${ruleChainName}'
Template message: ${componentType} '${componentName}' failed to ${action}
See Rule engine lifecycle event template for a list of the available template parameters.
Edge connection
The âEdge connectionâ rule sends a notification to tenant admins when the connection status between TB and Edge changes.
Trigger settings: the trigger filter allows you to filter notifications based on Edge instance status: Connected, Disconnected.
To create a new Edge connection rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Edge connection;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter notifications by Edge instances. If the field is empty, the trigger will be applied to all edge instances;
- You may also select the event types that will trigger notification: connected, disconnected;
- Click âAddâ.
Default rule
The default rule âEdge connection status changeâ will notify tenant administrators when connection status between TB and Edge changes.
Template subject: Edge connection status change
Template message: Edge '${edgeName}' is now ${eventType}
See Edge connection template for a list of the available template parameters.
Edge communication failure
The âEdge communication failureâ rule sends a notification to tenant admins when communication failures occur.
To create a new Edge communication failure rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Edge communication failure;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter notifications by Edge instances. If the field is empty, the trigger will be applied to all edge instances;
- Click âAddâ.
Default rule
The default rule âEdge communication failureâ will notify tenant administrators when communication failures occur.
Template subject: Edge '${edgeName}' communication failure occurred
Template message: Failure message: '${failureMsg}'
See Edge communication failure template for a list of the available template parameters.
Entities limit
The system administrator uses the âEntities limitâ rule to notify tenants that they will reach the limit on the number of entities (devices or assets). For example, notify when tenant has reached 80% of the 100 devices allowed. The max number of devices is extracted from the tenant profile.
To create a new entities limit rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - Entities limit;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter entities by type and setup threshold;
- Click âAddâ.
Default rule
The default rule âEntities Limitâ will notify affected tenant administrators and system administrators when number of devices is above 80% of allowed.
Template subject: ${entityType}s limit will be reached soon
Template message: ${entityType}s usage: ${currentCount}/${limit} (${percents}%)
See Entities limit template for a list of the available template parameters.
API usage limit
The system administrator uses the âAPI usage limitâ rule to notify tenants that they have reached the limit of used units.
For example, notify when tenant has reached 80% of the 100 alarms . The max number of alarms is extracted from the tenant profile.
To create a new API usage limit rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - API usage limit;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- The trigger filter allows you to filter entities by API features;
- You may also select the event types that will trigger notification: enable, warning, disabled;
- Click âAddâ.
Default rule
The default rule âAPI usage limitâ will notify affected tenant administrators and system administrators when number of units is above 80% of allowed.
Template subject: ${feature}s limit will be reached soon
Template message: ${feature} feature - ${status:upperCase} (usage: ${currentValue} out of ${limit} ${unitLabel}s)
See API usage limit template for a list of the available template parameters.
New platform version
The system administrator uses the âNew platform versionâ rule to notify tenants about the release of a new version of the Thingsboard platform.
To create a new platform version rule, follow these steps:
- Click the âAdd ruleâ button in the upper right corner of the âRulesâ tab;
- In the new pop-up window, enter the rule's name;
- Select trigger - New platform version;
- Then, select template from the list or create your own;
- Specify the recipient of the notification. Click âNextâ;
- Optionally enter a description, then click âAddâ.
Default rule
The default rule âNew platform versionâ will notify affected tenant administrators and system administrators when a new version of the Thingsboard platform is released.
Template subject: New version ${latestVersion} is available
Template message: Current version is ${currentVersion}. You can upgrade your Thingsboard instance to version ${latestVersion}.
See New platform version template for a list of the available template parameters.