Skip to main content

Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP)

Workflow preview

Workflow preview
100%
Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

IoT Sensor Data Cleaner + InfluxDB Logger (n8n Webhook Function InfluxDB) This workflow accepts raw sensor data from IoT devices via webhook, applies basic cleaning and transformation logi...

Best for

  • Engineering automation workflows
  • Multimodal AI automation workflows
  • beginner n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.function, n8n-nodes-base.set, n8n-nodes-base.httprequest

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by WeblineIndia.

Original n8n.io source

1.1 Workflow description

Title
Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP)
Workflow name
Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP)

🌑 IoT Sensor Data Cleaner + InfluxDB Logger (n8n | Webhook | Function | InfluxDB)

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 using dashboards like Grafana or Chronograf.

⚑ Quick Implementation Steps

  1. Import the workflow JSON into your n8n instance.
  2. Edit the Set Config node to include your InfluxDB credentials and measurement name.
  3. Use the webhook URL (/webhook/sensor-data) in your IoT device or form to send sensor data.
  4. Start monitoring your data directly in InfluxDB!

🎯 Who’s It For

  • IoT developers and integrators.
  • Renewable energy and environmental monitoring teams.
  • Data engineers working with time-series data.
  • Smart agriculture and utility automation platforms.

πŸ›  Requirements

Tool Purpose
n8n Instance For automation
InfluxDB (v1 or v2) To store time-series sensor data
IoT Device or Platform To POST sensor data
Function Node To filter and transform data

🧠 What It Does

  • Accepts JSON-formatted sensor data via HTTP POST.
  • Validates the data (removes invalid or noisy readings).
  • Applies transformation (rounding, timestamp formatting).
  • Pushes the cleaned data to InfluxDB for real-time visualization.

🧩 Workflow Components

  • Webhook Node: Exposes an HTTP endpoint to receive sensor data.
  • Function Node: Filters out-of-range values, formats timestamp, rounds data.
  • Set Node: Stores configurable values like InfluxDB host, user/pass, and measurement name.
  • InfluxDB Node: Writes valid records into the specified database bucket.

πŸ”§ How To Set Up – Step-by-Step

  1. Import Workflow:

    • Upload the provided .json file into your n8n workspace.
  2. Edit Configuration Node:

    • Update InfluxDB connection info in the Set Config node:
      • influxDbHost, influxDbDatabase, influxDbUsername, influxDbPassword
      • measurement: What you want to name the data set (e.g., sensor_readings)
  3. Send Data to Webhook:

    • Webhook URL: https://your-n8n/webhook/sensor-data
    • Example payload:
      {
        "temperature": 78.3,
        "humidity": 44.2,
        "voltage": 395.7,
        "timestamp": "2024-06-01T12:00:00Z"
      }
      
  4. View in InfluxDB:

    • Log in to your InfluxDB/Grafana dashboard and query the new measurement.

✨ How To Customize

Customization Method
Add more fields (e.g., wind_speed) Update the Function & InfluxDB nodes
Add field/unit conversion Use math in the Function node
Send email alerts on anomalies Add IF β†’ Email branch after Function node
Store in parallel in Google Sheets Add Google Sheets node for hybrid logging

βž• Add‑ons (Advanced)

Add-on Description
πŸ“Š Grafana Integration Real-time charts using InfluxDB
πŸ“§ Email on Faulty Data Notify if voltage < 0 or temperature too high
🧠 AI Filtering Add OpenAI or TensorFlow for anomaly detection
πŸ—ƒ Dual Logging Save data to both InfluxDB and BigQuery/Sheets

πŸ“ˆ Use Case Examples

  1. Remote solar inverter sends temperature and voltage via webhook.
  2. Environmental sensor hub logs humidity and air quality data every minute.
  3. Smart greenhouse logs climate control sensor metrics.
  4. Edge IoT devices periodically report health and diagnostics remotely.

🧯 Troubleshooting Guide

Issue Cause Solution
No data logged in InfluxDB Invalid credentials or DB name Recheck InfluxDB values in config
Webhook not triggered Wrong method or endpoint Confirm it is a POST to /webhook/sensor-data
Data gets filtered Readings outside valid range Check logic in Function node
Data not appearing in dashboard Influx write format error Inspect InfluxDB log and field names

πŸ“ž Need Assistance?

Need help integrating this workflow into your energy monitoring system or need InfluxDB dashboards built for you?

πŸ‘‰ Contact WeblineIndia | Experts in workflow automation and time-series analytics.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sensor Input

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1

Block 2 - Clean & Transform Data

Type / Role
n8n-nodes-base.function - function
Config choices
Version 1

Block 3 - Set Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 1

Block 4 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

3. Summary Table

Workflow Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP)
Complexity beginner
Nodes 4
Categories Engineering, Multimodal AI
Author WeblineIndia
Published 11 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7248/7248.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Clean and log IoT sensor data to InfluxDB (Webhook | Function | HTTP) do?

IoT Sensor Data Cleaner + InfluxDB Logger (n8n Webhook Function InfluxDB) This workflow accepts raw sensor data from IoT devices via webhook, applies basic cleaning and transformation logi...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, Multimodal AI use case.