@thingsboard/n8n-nodes-thingsboard 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -143
- package/dist/package.json +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/images/ai-agent-usecase.png +0 -0
- package/images/banner.png +0 -0
- package/images/dynamic-result.png +0 -0
- package/images/save-entity-attributes.png +0 -0
- package/images/telemetry-export-result.png +0 -0
- package/images/telemetry-export.png +0 -0
- package/images/thingsboard.svg +10 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,28 +39,10 @@ npm install @thingsboard/n8n-nodes-thingsboard
|
|
|
39
39
|
3. Add the ThingsBoard node to your workflow
|
|
40
40
|
4. Select a resource (Device, Asset, etc.) and operation
|
|
41
41
|
|
|
42
|
-
### Usage
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
## 📦 Installation
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
*Example*: "Show me all devices" → Agent calls ThingsBoard → Natural language response
|
|
48
|
-
|
|
49
|
-
**💡 Direct Operations** - Configure operations with fixed values in the node interface
|
|
50
|
-
*Example*: Save specific attributes to device `abc-123` on a schedule
|
|
51
|
-
|
|
52
|
-
**🔄 Dynamic Operations** - Pass data from previous nodes using expressions
|
|
53
|
-
*Example*: Process alarm webhook → Extract entity ID → Get attributes → Send notification
|
|
54
|
-
|
|
55
|
-
See [Usage Examples](#-usage-examples) below for detailed walkthroughs with screenshots.
|
|
56
|
-
|
|
57
|
-
**Operation Modes**: For create operations (Device, Asset, Dashboard), you can choose:
|
|
58
|
-
- **Params Mode**: Use simple form fields (name, type, label, customer ID)
|
|
59
|
-
- **JSON Mode**: Paste a complete ThingsBoard entity JSON object
|
|
60
|
-
|
|
61
|
-
## 📦 Installation Methods
|
|
62
|
-
|
|
63
|
-
### Method 1: GUI Installation (Recommended for Self-Hosted)
|
|
45
|
+
### GUI Installation
|
|
64
46
|
|
|
65
47
|
For self-hosted n8n instances, you can install directly via the web interface:
|
|
66
48
|
|
|
@@ -74,79 +56,7 @@ For self-hosted n8n instances, you can install directly via the web interface:
|
|
|
74
56
|
|
|
75
57
|
**Note**: This method requires owner/admin permissions and is only available for self-hosted n8n (not n8n Cloud).
|
|
76
58
|
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
For local n8n installations, install the node via npm:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Create and navigate to the nodes directory
|
|
83
|
-
mkdir -p ~/.n8n/nodes
|
|
84
|
-
cd ~/.n8n/nodes
|
|
85
|
-
|
|
86
|
-
# Install the ThingsBoard node
|
|
87
|
-
npm install @thingsboard/n8n-nodes-thingsboard
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
After installation, restart n8n:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# If running n8n directly
|
|
94
|
-
n8n start
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**AI Agent Tool Usage**: If you plan to use the ThingsBoard node as a tool for AI Agents, set these environment variables before starting n8n:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
export N8N_COMMUNITY_PACKAGES_ENABLED=true
|
|
101
|
-
export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
102
|
-
n8n start
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Method 3: Docker Installation
|
|
106
|
-
|
|
107
|
-
**Step 1**: Create a directory for n8n and navigate to it:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
mkdir n8n
|
|
111
|
-
cd n8n
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Step 2**: Create a `docker-compose.yml` file in this directory:
|
|
115
|
-
|
|
116
|
-
```yaml
|
|
117
|
-
services:
|
|
118
|
-
n8n:
|
|
119
|
-
image: n8nio/n8n:latest
|
|
120
|
-
ports:
|
|
121
|
-
- "5678:5678"
|
|
122
|
-
environment:
|
|
123
|
-
- N8N_BASIC_AUTH_ACTIVE=true
|
|
124
|
-
- N8N_BASIC_AUTH_USER=admin
|
|
125
|
-
- N8N_BASIC_AUTH_PASSWORD=password
|
|
126
|
-
# Uncomment the lines below to use ThingsBoard node as AI Agent tool
|
|
127
|
-
# - N8N_COMMUNITY_PACKAGES_ENABLED=true
|
|
128
|
-
# - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
129
|
-
volumes:
|
|
130
|
-
- n8n_data:/home/node/.n8n
|
|
131
|
-
|
|
132
|
-
volumes:
|
|
133
|
-
n8n_data:
|
|
134
|
-
driver: local
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**Step 3**: Start the services:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
docker-compose up -d
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**Step 4**: After n8n starts, install the ThingsBoard node using the **GUI method** (Method 1):
|
|
144
|
-
1. Open n8n in your browser (`http://localhost:5678`)
|
|
145
|
-
2. Navigate to **Settings** → **Community Nodes**
|
|
146
|
-
3. Install `@thingsboard/n8n-nodes-thingsboard`
|
|
147
|
-
4. Refresh your browser
|
|
148
|
-
|
|
149
|
-
### Method 4: n8n Cloud
|
|
59
|
+
### n8n Cloud
|
|
150
60
|
|
|
151
61
|
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.
|
|
152
62
|
|
|
@@ -324,59 +234,19 @@ The AI agent understands context and calls the appropriate ThingsBoard operation
|
|
|
324
234
|
|
|
325
235
|
---
|
|
326
236
|
|
|
327
|
-
### Example 2: 💡
|
|
328
|
-
|
|
329
|
-
Configure operations with **hardcoded values** directly in the node interface. Perfect for scheduled tasks and testing.
|
|
330
|
-
|
|
331
|
-

|
|
332
|
-
|
|
333
|
-
#### Use Case
|
|
334
|
-
|
|
335
|
-
Save configuration attributes to a specific device on a schedule
|
|
336
|
-
|
|
337
|
-
#### Configuration
|
|
338
|
-
|
|
339
|
-
- **Resource**: Telemetry
|
|
340
|
-
- **Operation**: Save Entity Attributes
|
|
341
|
-
- **Entity Type**: DEVICE
|
|
342
|
-
- **Entity ID**: `2d2c8cc0-d75a-11f0-9e9b-db8ef79a21ad` *(hardcoded)*
|
|
343
|
-
- **Scope**: SERVER_SCOPE
|
|
344
|
-
- **Attributes JSON**: Direct JSON input
|
|
345
|
-
|
|
346
|
-
```json
|
|
347
|
-
{
|
|
348
|
-
"stringKey": "value1",
|
|
349
|
-
"booleanKey": true,
|
|
350
|
-
"doubleKey": 42.0,
|
|
351
|
-
"longKey": 73,
|
|
352
|
-
"jsonKey": {
|
|
353
|
-
"someNumber": 42,
|
|
354
|
-
"someArray": [1, 2, 3],
|
|
355
|
-
"someNestedObject": {"key": "value"}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
#### Typical Use Cases
|
|
361
|
-
|
|
362
|
-
- Daily configuration updates on a schedule
|
|
363
|
-
- Testing API operations during development
|
|
364
|
-
- One-time bulk data migrations
|
|
365
|
-
- Periodic attribute updates with fixed values
|
|
366
|
-
|
|
367
|
-
---
|
|
368
|
-
|
|
369
|
-
### Example 3: 🔄 Dynamic Operations - Flow-Based Automation
|
|
370
|
-
|
|
371
|
-
Pass data from previous nodes using **expressions** to create dynamic, data-driven workflows.
|
|
372
|
-
|
|
373
|
-

|
|
237
|
+
### Example 2: 💡 Daily Telemetry Export to AWS S3
|
|
374
238
|
|
|
375
|
-
|
|
239
|
+
**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.
|
|
376
240
|
|
|
377
|
-
|
|
241
|
+
**Why use n8n instead of ThingsBoard's native export**:
|
|
242
|
+
- **Multi-destination** - Send the same data to S3 + Snowflake + email report in one workflow
|
|
243
|
+
- **Data transformation** - Enrich telemetry with business context (customer names, locations from CRM)
|
|
244
|
+
- **Custom formats** - Convert to Parquet, Avro, or CSV with specific schemas for your analytics tools
|
|
245
|
+
- **Conditional logic** - Export only specific devices, filter by customer tier, or aggregate before storage
|
|
246
|
+
- **Integration chains** - After S3 upload → Trigger AWS Lambda → Update tracking database → Send Slack notification
|
|
378
247
|
|
|
379
|
-
|
|
248
|
+

|
|
249
|
+

|
|
380
250
|
|
|
381
251
|
For a complete step-by-step guide with detailed screenshots, see the [full documentation](https://thingsboard.io/docs/samples/analytics/n8n-node/).
|
|
382
252
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thingsboard/n8n-nodes-thingsboard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "n8n node for ThingsBoard",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"lintfix": "eslint nodes credentials package.json --fix",
|
|
30
30
|
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json"
|
|
31
31
|
},
|
|
32
|
-
"files": ["dist", "README.md", "LICENSE.md", "package.json"],
|
|
32
|
+
"files": ["dist", "images", "README.md", "LICENSE.md", "package.json"],
|
|
33
33
|
"n8n": {
|
|
34
34
|
"n8nNodesApiVersion": 1,
|
|
35
35
|
"credentials": [
|