This workflow corresponds to n8n.io template #7248 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "Vz7fCuVAkUFMUjHC",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "IoT Sensor Data Cleaner + InfluxDB Logger (n8n | Webhook | Function | InfluxDB)",
"tags": [],
"nodes": [
{
"id": "0a94db25-793e-4d2d-867a-5fe8132c849c",
"name": "Sensor Input",
"type": "n8n-nodes-base.webhook",
"position": [
-620,
-60
],
"parameters": {
"path": "sensor-data",
"options": {
"responseData": "{\"status\":\"received\"}"
},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "7b1507ea-8760-45ff-bee8-d656723ce34e",
"name": "Clean & Transform Data",
"type": "n8n-nodes-base.function",
"position": [
-220,
-60
],
"parameters": {
"functionCode": "const data = $json.body;\n\nfunction isValid(value, min, max) {\n return typeof value === 'number' && value >= min && value <= max;\n}\n\nif (!isValid(data.temperature, -50, 150) || \n !isValid(data.humidity, 0, 100) || \n !isValid(data.voltage, 0, 500)) {\n throw new Error('Invalid sensor data range');\n}\n\nconst cleaned = {\n temperature: Math.round(data.temperature * 10) / 10,\n humidity: Math.round(data.humidity * 10) / 10,\n voltage: Math.round(data.voltage * 10) / 10,\n timestamp: new Date(data.timestamp).toISOString()\n};\n\nreturn [\n {\n json: cleaned\n }\n];"
},
"typeVersion": 1
},
{
"id": "2bd6195b-4989-4e86-a622-79c5131ccf4e",
"name": "Set Config",
"type": "n8n-nodes-base.set",
"position": [
-420,
-60
],
"parameters": {
"values": {
"string": [
{
"name": "influxDbHost",
"value": "hosturl"
},
{
"name": "influxDbToken",
"value": "token"
},
{
"name": "influxDbBucket",
"value": "bucket"
},
{
"name": "influxDbOrg",
"value": "org"
},
{
"name": "measurement",
"value": "table"
}
]
},
"options": {}
},
"typeVersion": 1
},
{
"id": "6afbb252-6628-4ad3-81da-f8a5db70c171",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
20,
-60
],
"parameters": {
"url": "={{$node[\"Set Config\"].json[\"influxDbHost\"]}}/api/v2/write",
"body": "={{$node[\"Set Config\"].json[\"measurement\"]}} temperature={{$json[\"temperature\"]}},humidity={{$json[\"humidity\"]}},voltage={{$json[\"voltage\"]}} {{Date.parse($json[\"timestamp\"])}}",
"method": "POST",
"options": {},
"sendBody": true,
"sendQuery": true,
"contentType": "raw",
"sendHeaders": true,
"rawContentType": "text/plain",
"queryParameters": {
"parameters": [
{
"name": "bucket",
"value": "={{$node[\"Set Config\"].json[\"influxDbBucket\"]}}"
},
{
"name": "org",
"value": "={{$node[\"Set Config\"].json[\"influxDbOrg\"]}}"
},
{
"name": "precision",
"value": "={{$node[\"Set Config\"].json[\"precision\"]}}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Token {{$node[\"Set Config\"].json[\"influxDbToken\"]}}"
}
]
}
},
"typeVersion": 4.2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "bbe71c64-0ee9-4bef-af35-99f00227f20f",
"connections": {
"Set Config": {
"main": [
[
{
"node": "Clean & Transform Data",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[]
]
},
"Sensor Input": {
"main": [
[
{
"node": "Set Config",
"type": "main",
"index": 0
}
]
]
},
"Clean & Transform Data": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow accepts raw sensor data from IoT devices via webhook, applies basic cleaning and transformation logic, and writes the cleaned data to an InfluxDB instance for time-series tracking. Perfect for renewable energy sites, smart farms and environmental monitoring setups…
Source: https://n8n.io/workflows/7248/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c