{
  "name": "Robot Fleet Telemetry Monitor — Health, Battery and Geofence Alerts",
  "description": "Subscribes to your ROS 2 / MQTT telemetry, tracks battery, error codes and geofence breaches per robot, and alerts before a unit fails mid-shift.",
  "type": "GROWAIFY_SAMPLE",
  "notice": "Public preview — 2 of 6 nodes, connections removed. The full, working workflow is delivered after purchase at https://growaify.com/templates/",
  "nodes_total_in_full_version": 6,
  "category": "Robotics",
  "price_usd": 79,
  "nodes": [
    {
      "parameters": {
        "topics": "fleet/+/telemetry",
        "options": {
          "jsonParseBody": true
        }
      },
      "name": "Fleet Telemetry (MQTT)",
      "type": "n8n-nodes-base.mqttTrigger",
      "typeVersion": 1,
      "position": [
        -440,
        0
      ],
      "id": "h000001-0000-4000-8000-000000000001",
      "credentials": {
        "mqtt": {
          "id": "REPLACE_WITH_YOUR_MQTT_CRED",
          "name": "MQTT Broker"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const alerts = [];\nfor (const item of $input.all()) {\n  const d = item.json;\n  const robot = d.robot_id || d.device_id || 'unknown';\n  const batt = Number(d.battery_pct != null ? d.battery_pct : 100);\n  const temp = Number(d.motor_temp_c || 0);\n  const err  = d.error_code || d.fault || null;\n  const lat = Number(d.lat || 0), lon = Number(d.lon || 0);\n  const fence = d.geofence || null;\n  const issues = [];\n  if (batt < 20) issues.push('battery low (' + batt + '%)');\n  if (temp > 75) issues.push('motor temp high (' + temp + 'C)');\n  if (err) issues.push('error code ' + err);\n  if (fence === 'outside') issues.push('geofence breach at ' + lat + ',' + lon);\n  if (issues.length) alerts.push({ json: {\n    robot_id: robot, issues: issues, severity: (batt < 10 || err) ? 'critical' : 'warning',\n    battery_pct: batt, motor_temp_c: temp, error_code: err, lat: lat, lon: lon,\n    seen_at: new Date().toISOString()\n  }});\n}\nreturn alerts;"
      },
      "name": "Normalize & Evaluate",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -220,
        0
      ],
      "id": "h000002-0000-4000-8000-000000000002"
    }
  ],
  "connections": {},
  "meta": {
    "growaify_template": "robot-fleet-telemetry",
    "sample": true,
    "buy": "https://growaify.com/templates/"
  }
}