Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
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

IoT Rule Chains

Install ready-made automation logic in one click — alerting, data processing, device lifecycle, and external integrations you plug into your existing rule chain.

Contribute
Rule Chains illustration

7 results

Share Your Rule Chain with the Community

Built a useful automation workflow? From a simple alarm recipe to a complex multi-cloud integration — publish it to the IoT Hub. Share it with thousands of ThingsBoard developers.

Frequently Asked Questions

Rule chains are visual message processing pipelines. Every message entering ThingsBoard (telemetry, attributes, RPC, lifecycle events) flows through a rule chain. Each node in the chain performs an operation — filtering, enriching, transforming, or acting on the message — and routes it to the next node. ThingsBoard ships with a default Root Rule Chain, and the IoT Hub offers community-contributed chains for specialized automation.

The rule engine is the ThingsBoard component that processes incoming messages in real time. It runs your rule chains — every device message passes through the rule engine, which routes it through the chain's nodes to filter, transform, store, raise alarms, or trigger external actions. Rule chains from the IoT Hub run on this same engine.

Open the rule chain page and click Install. In the dialog you can import the chain on its own, or set it as the default rule chain for a device or asset profile (with a confirmation if that profile already has one). The chain then appears in your Rule Chains list and starts receiving messages as soon as it's wired in or bound to a profile. You can also download the JSON and import it manually via Rule Chains → Import rule chain.

No. Imported rule chains are always created as new, separate chains. You must explicitly set a chain as the root for a device profile or connect it as a sub-chain. Your existing root chain is never modified by import.

The root rule chain is the entry point for all messages from devices using a given device profile. Sub-chains are reusable modules connected from the root chain (or other sub-chains) via the Rule Chain node. Many IoT Hub rule chains are designed as sub-chains that you plug into your existing root chain without replacing it.

POST_TELEMETRY_REQUEST (sensor data), POST_ATTRIBUTES_REQUEST (attribute updates), RPC_REQUEST (commands), ACTIVITY_EVENT (connect/disconnect), INACTIVITY_EVENT (device timeout), ALARM (alarm lifecycle), and custom message types. Use Message Type Switch to route each type differently.

Seven categories: Filter (route by conditions), Enrichment (add context), Transformation (modify payload), Action (save/alarm/RPC), External (integrate with external systems), Flow (connect sub-chains), and Analytics (aggregate data).

By Type (CORE for the main server, EDGE for ThingsBoard Edge), by Category (Alerting, Analytics, Automation, Data Processing, Device Connectivity, Integration), and by shared Use Case tags. Browse categories describe what a chain does and are distinct from the node building blocks inside it.

Each rule chain is tagged with shared IoT use cases, so filtering by a use case surfaces matching chains, widgets, and devices together. Popular use cases include Asset Tracking, Fleet Tracking, Industrial Automation, Predictive Maintenance, and Smart Farming; the full vocabulary is searchable in the Use Case filter.

Check the IoT Rule Chain Contribution Guide that describes the process of adding rule chains. You can also contact us or email iothub@thingsboard.io for help.

Document all external dependencies (Kafka broker, SMTP server, REST API endpoint, etc.) in your README. The manifest has an externalDependencies field listing required services. Users will need to configure their own credentials/endpoints after import.