n8n node for ThingsBoard
npm install @thingsboard/n8n-nodes-thingsboardn8n is a workflow automation platform that combines traditional business process automation with AI capabilities.
The ThingsBoard n8n Node provides deep and native integration between n8n and the ThingsBoard IoT Platform, enabling you to manage IoT infrastructure directly from n8n workflows.
- Manage IoT devices, assets, and customers directly from n8n workflows
- Access and manipulate telemetry data in real-time with attribute and time-series operations
- Monitor alarms and create automated responses based on alarm severity and type
- Navigate entity relationships to understand your IoT infrastructure topology
- Build AI-powered IoT automation using n8n AI Agents with natural language commands
- Automate complex IoT workflows with 61 operations across 8 resources (51 operations for Community Edition)
For detailed documentation including usage examples, workflow patterns, and API reference, visit:
ThingsBoard n8n Node Documentation
``bash`
npm install @thingsboard/n8n-nodes-thingsboard
1. In n8n, add ThingsBoard credentials:
- Base URL: https://demo.thingsboard.io, https://thingsboard.cloud or your instance URL
- Authentication Type: Choose API Key (recommended) or Username / Password
- API Key: Your ThingsBoard API key (see API Key documentation)
2. Add the ThingsBoard node to your workflow
3. Select a resource (Device, Asset, etc.) and operation
For self-hosted n8n instances, you can install directly via the web interface:
1. Open n8n in your browser
2. Navigate to Settings → Community Nodes
3. Click Install a community node
4. Enter package name: @thingsboard/n8n-nodes-thingsboard
5. Click Install
6. Wait for installation to complete
7. Refresh your browser
Note: This method requires owner/admin permissions and is only available for self-hosted n8n (not n8n Cloud).
The ThingsBoard node requires verification to be available on n8n Cloud. n8n Cloud supports a select group of verified community nodes included in their official catalog.
Current Status: Until the node is verified and included in the Cloud-available catalog, use self-hosted n8n (local or Docker) with any installation method above.
After installation and restart:
1. Open n8n in your browser (typically http://localhost:5678)
2. Create a new workflow
3. Click the + button to add a node
4. Search for "ThingsBoard" in the node picker
5. The ThingsBoard node should appear in the search results
If you don't see the node:
- Verify the npm installation completed without errors
- Ensure you restarted n8n after installation (for Method 2)
- Check n8n logs for any loading errors
Before using the ThingsBoard node, configure your connection credentials:
1. In n8n, navigate to Credentials → New Credential
2. Search for "ThingsBoard API"
3. Fill in the required fields:
#### Option A: API Key (recommended)
| Field | Description | Example |
|-------|-------------|---------|
| Base URL | ThingsBoard instance URL | https://demo.thingsboard.io or https://thingsboard.cloud |your-api-key-here
| Authentication Type | Select API Key | |
| API Key | Your ThingsBoard API key | |
To create an API key, go to your ThingsBoard instance → API Keys and generate a new key. See the API Key documentation for details.
#### Option B: Username / Password
| Field | Description | Example |
|-------|-------------|---------|
| Base URL | ThingsBoard instance URL | https://demo.thingsboard.io or https://thingsboard.cloud |tenant@thingsboard.org
| Authentication Type | Select Username / Password | |
| Username | Your ThingsBoard account email | |tenant
| Password | Your ThingsBoard account password | |
4. Click Save to store the credentials
The credentials are encrypted and stored securely by n8n. You can reuse the same credentials across multiple ThingsBoard nodes in different workflows.
Total: 61 operations across 8 resources
`bashClone the repository
git clone https://github.com/thingsboard/thingsboard-n8n-node.git
cd thingsboard-n8n-node
$3
`bash
Link the package
npm linkIn your n8n directory
npm link @thingsboard/n8n-nodes-thingsboardStart n8n
n8n start
`💡 Usage Examples
$3
Use the ThingsBoard node as a tool for AI Agents to enable intelligent, natural language IoT automation.
#### How it works
1. User sends a chat message: "What devices do I have and what's their status?"
2. AI Agent (powered by Google Gemini or OpenAI GPT-4) has access to ThingsBoard tools
3. Agent autonomously calls:
-
Get devices in ThingsBoard → Retrieves device list
- Get timeseries in ThingsBoard` → Fetches latest telemetry#### Natural language commands
- "Show me the temperature of my living room sensor"
- "Which devices are offline right now?"
- "Update the threshold on device X to 30 degrees"
- "Send me an alert if any temperature exceeds 25°C"
The AI agent understands context and calls the appropriate ThingsBoard operations automatically!
---
Real-world scenario: Every night, export device telemetry to S3, but also enrich it with device metadata from your CRM, convert to Parquet format for Athena, and trigger a Lambda function to update your data warehouse. One workflow, multiple outputs.
Why use n8n instead of ThingsBoard's native export:
- Multi-destination - Send the same data to S3 + Snowflake + email report in one workflow
- Data transformation - Enrich telemetry with business context (customer names, locations from CRM)
- Custom formats - Convert to Parquet, Avro, or CSV with specific schemas for your analytics tools
- Conditional logic - Export only specific devices, filter by customer tier, or aggregate before storage
- Integration chains - After S3 upload → Trigger AWS Lambda → Update tracking database → Send Slack notification
!Daily telemetry export
!Daily telemetry export result
For a complete step-by-step guide with detailed screenshots, see the full documentation.
The ThingsBoard n8n node is built on top of the ThingsBoard REST API. For detailed information about API endpoints, request/response formats, and additional parameters, refer to the ThingsBoard REST API documentation.
- npm Package: @thingsboard/n8n-nodes-thingsboard
- GitHub Repository: thingsboard/thingsboard-n8n-node
- n8n Documentation: docs.n8n.io
- n8n Community: community.n8n.io
- ThingsBoard REST API: REST API Reference
If you encounter issues or have questions about the ThingsBoard n8n node:
- GitHub Issues: Report bugs or request features
- ThingsBoard Community: Get help from the community
- n8n Community: n8n community
MIT License - see the LICENSE file for details.
---
n8n is a fair-code licensed workflow automation platform.