{
  "name": "Real-time IoT incident management with Jira & Slack technician alerts",
  "nodes": [
    {
      "id": "d238dbb2-3754-41c4-b711-372b9abdd5d7",
      "name": "Receive IoT Machine Alert",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1360,
        816
      ]
    },
    {
      "id": "3db39226-36ee-411f-824c-cd6258cc578b",
      "name": "Check Failure Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        -1088,
        816
      ]
    },
    {
      "id": "5ebeda68-69cb-4dda-9c23-d372316731b9",
      "name": "Create Jira Maintenance Ticket",
      "type": "n8n-nodes-base.jira",
      "position": [
        -848,
        800
      ]
    },
    {
      "id": "8cd54d87-4542-45fa-8bcc-5134d773662b",
      "name": "Fetch Technician Channel Members",
      "type": "n8n-nodes-base.slack",
      "position": [
        -496,
        800
      ]
    },
    {
      "id": "e2e9f3e0-21f4-49f7-9865-4aa14d94b14d",
      "name": "Prepare Technician Iteration Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -304,
        800
      ]
    },
    {
      "id": "014820bc-1c2e-4def-a55d-d8f72fe222e2",
      "name": "Loop Through Technicians",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -64,
        800
      ]
    },
    {
      "id": "4a949864-5d43-4a00-903f-8605222d5e93",
      "name": "Get Technician Presence Status",
      "type": "n8n-nodes-base.slack",
      "position": [
        160,
        816
      ]
    },
    {
      "id": "029a11f5-4483-4154-aec3-79bb944822c7",
      "name": "Check If Technician Active",
      "type": "n8n-nodes-base.if",
      "position": [
        368,
        816
      ]
    },
    {
      "id": "ad488dae-56a9-4fba-9a77-3bd07b714f3c",
      "name": "Format Technician Availability Result",
      "type": "n8n-nodes-base.set",
      "position": [
        624,
        800
      ]
    },
    {
      "id": "0cfaa458-11ab-49b7-8a70-1bedcd30a49f",
      "name": "Select Final Available Technician",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        240
      ]
    },
    {
      "id": "992b5731-f04f-4bb7-a734-b621a96fe586",
      "name": "Check If Any Technician Available",
      "type": "n8n-nodes-base.if",
      "position": [
        384,
        240
      ]
    },
    {
      "id": "7f9eba04-e250-4949-b81a-3eae8813b516",
      "name": "Send Technicians Alert (Active Tech)",
      "type": "n8n-nodes-base.slack",
      "position": [
        656,
        128
      ]
    },
    {
      "id": "c3971d9b-3271-4634-a2ae-c2d4c575bf70",
      "name": "Escalate to Ops Emergency Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        656,
        320
      ]
    },
    {
      "id": "2d2eb6dc-a130-4c6a-a5a7-bfa98dc690c8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1952,
        80
      ],
      "parameters": {
        "width": 400,
        "height": 768,
        "content": "## How it Works \nThis workflow automates predictive maintenance by linking IoT devices, Jira, and Slack. When a machine sends a webhook with data like temperature or vibration, the workflow checks if "
      }
    },
    {
      "id": "e9e516d9-e3bc-416a-af0d-d34d0d0ec482",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        608
      ],
      "parameters": {
        "width": 800,
        "height": 416,
        "content": "## Data Intake & Failure Detection\n### Receives real-time machine data from IoT devices and evaluates it against defined safety thresholds (temperature, vibration, etc.). If a failure is detected, aut"
      }
    },
    {
      "id": "f4e9f5c4-37b7-4b01-babd-e80e694ede61",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        624
      ],
      "parameters": {
        "width": 1408,
        "height": 400,
        "content": "## Technician Identification & Presence Check\n### Fetches members from a selected Slack channel and processes them in batches to check real-time presence. Ensures scalable, efficient monitoring, provi"
      }
    },
    {
      "id": "ae161b2b-e9b8-4749-9074-9755907cc428",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 896,
        "height": 528,
        "content": "## Technician Selection & Escalation Logic \n### Determines the first available technician using custom logic. If a technician is online, alerts are routed to the designated channel; if none are availa"
      }
    }
  ],
  "connections": {
    "Check Failure Threshold": {
      "main": [
        [
          {
            "node": "Create Jira Maintenance Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Technicians": {
      "main": [
        [
          {
            "node": "Select Final Available Technician",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Technician Presence Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive IoT Machine Alert": {
      "main": [
        [
          {
            "node": "Check Failure Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Technician Active": {
      "main": [
        [
          {
            "node": "Format Technician Availability Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Jira Maintenance Ticket": {
      "main": [
        [
          {
            "node": "Fetch Technician Channel Members",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Technician Presence Status": {
      "main": [
        [
          {
            "node": "Check If Technician Active",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Technician Channel Members": {
      "main": [
        [
          {
            "node": "Prepare Technician Iteration Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Any Technician Available": {
      "main": [
        [
          {
            "node": "Send Technicians Alert (Active Tech)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Escalate to Ops Emergency Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Technician Iteration Data": {
      "main": [
        [
          {
            "node": "Loop Through Technicians",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Final Available Technician": {
      "main": [
        [
          {
            "node": "Check If Any Technician Available",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Technician Availability Result": {
      "main": [
        [
          {
            "node": "Loop Through Technicians",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}