{
  "name": "PLC / SCADA Alarm Router — Severity, Ownership and Escalation",
  "description": "Turns raw PLC alarm streams into routed, deduplicated and escalated work orders so the right engineer gets paged for the right fault.",
  "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": "Industrial",
  "price_usd": 89,
  "nodes": [
    {
      "parameters": {
        "topics": "plant/+/alarms",
        "options": {
          "jsonParseBody": true
        }
      },
      "name": "PLC Alarm Trigger",
      "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 CRIT = ['E_STOP','OVERTEMP','PRESSURE_HIGH','DOOR_OPEN','SAFETY'];\nconst out = [];\nfor (const item of $input.all()) {\n  const d = item.json;\n  const code = String(d.alarm_code || d.code || '').toUpperCase();\n  const line = d.line_id || d.line || 'line';\n  const critical = CRIT.some(function (c) { return code.indexOf(c) !== -1; });\n  out.push({ json: {\n    alarm_code: code, line_id: line, station: d.station || null,\n    message: d.message || code, value: d.value != null ? d.value : null,\n    severity: critical ? 'critical' : (d.level === 'warn' ? 'warning' : 'info'),\n    dedupe_key: line + ':' + code,\n    raised_at: new Date().toISOString()\n  }});\n}\nreturn out;"
      },
      "name": "Severity & Dedupe",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -220,
        0
      ],
      "id": "h000002-0000-4000-8000-000000000002"
    }
  ],
  "connections": {},
  "meta": {
    "growaify_template": "plc-alarm-router",
    "sample": true,
    "buy": "https://growaify.com/templates/"
  }
}