{
  "name": "Track Jira epic health with automated risk alerts via Slack, Monday & Sheets",
  "nodes": [
    {
      "id": "5bb8e683-bde5-48d3-a424-1221f40f6580",
      "name": "Trigger Every 6 Hours",
      "type": "n8n-nodes-base.cron",
      "position": [
        -2864,
        1360
      ]
    },
    {
      "id": "a452f278-a5ea-443a-b98e-b33bb7d27aef",
      "name": "📊 Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3216,
        1232
      ],
      "parameters": {
        "width": 280,
        "height": 256,
        "content": "📊 WORKFLOW START\n\nThis workflow monitors Jira Epics and calculates health scores:\n\n• Runs every 6 hours\n• Fetches all Epics\n• Analyzes linked issues\n• Calculates health metrics\n• Flags at-risk epics\n•"
      }
    },
    {
      "id": "e051afef-6cb0-45aa-b244-51baacd48602",
      "name": "Fetch All Epics from Jira",
      "type": "n8n-nodes-base.jira",
      "position": [
        -2608,
        1360
      ]
    },
    {
      "id": "aef82a98-c0db-40f6-a3bb-a9df4535ec98",
      "name": "📥 Fetch Epics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2752,
        1088
      ],
      "parameters": {
        "width": 280,
        "height": 236,
        "content": "📥 EPIC RETRIEVAL\n\nFetches all Epics from Jira:\n\n• Uses Jira REST API\n• getAll operation\n• Retrieves: Epic keys, names, fields\n• Filters to Epics only\n\nReturns list of all Epics in project\nPassed to Sp"
      }
    },
    {
      "id": "1d172b8c-c88f-4ab5-b6ce-19110edcd433",
      "name": "Split Epics for Processing",
      "type": "n8n-nodes-base.function",
      "position": [
        -2368,
        1360
      ]
    },
    {
      "id": "464b3b19-6f73-4a72-9dd4-8e77edb75439",
      "name": "🔀 Split Epics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2496,
        1552
      ],
      "parameters": {
        "width": 280,
        "height": 316,
        "content": "🔀 SPLIT EPICS\n\nTransforms Epic batch into individual items:\n\n• Iterates through each Epic\n• Extracts Epic key\n• Creates separate object per Epic\n• Enables sequential processing\n\nInput: Array of Epics\n"
      }
    },
    {
      "id": "63fe1ee2-e389-42f7-81ee-a8cf7fca80f7",
      "name": "Fetch Epic + Linked Issues",
      "type": "n8n-nodes-base.jira",
      "position": [
        -2112,
        1360
      ]
    },
    {
      "id": "0f47c09d-d22d-423e-9be4-e43fe3c39d0b",
      "name": "🔗 Fetch Linked",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2208,
        1024
      ],
      "parameters": {
        "width": 280,
        "height": 300,
        "content": "🔗 FETCH LINKED ISSUES\n\nFor each Epic, retrieves:\n\n• Epic metadata\n• All linked child issues\n• Issue details:\n  ✓ Status\n  ✓ Issue type (Bug/Task)\n  ✓ Labels (blocker, etc)\n  ✓ Cycle time metrics\n  ✓ C"
      }
    },
    {
      "id": "750efdd8-c544-41ee-aa9c-ac3c11df107a",
      "name": "Calculate Health Score",
      "type": "n8n-nodes-base.function",
      "position": [
        -1856,
        1360
      ]
    },
    {
      "id": "c8f3a361-a296-461d-93f8-3472d1f9f337",
      "name": "📈 Health Score",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1968,
        1536
      ],
      "parameters": {
        "width": 280,
        "height": 376,
        "content": "📈 HEALTH SCORE ALGORITHM\n\nWeighted formula (0-1 scale):\n\nmetrics calculated:\n✓ avgCycleTime: Average days/hours\n✓ bugRatio: Bugs / Total issues\n✓ churnRatio: Reopened / Total\n✓ blockerRatio: Blockers "
      }
    },
    {
      "id": "8aee7bd4-f155-4540-9598-d8923556673c",
      "name": "Is Score > 0.6 (At Risk)?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1616,
        1360
      ]
    },
    {
      "id": "e33d520e-955a-4ca2-9e11-1aaf8a078dfe",
      "name": "⚠️ Risk Check",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1792,
        1008
      ],
      "parameters": {
        "width": 280,
        "height": 316,
        "content": "⚠️ RISK THRESHOLD\n\nCondition: healthScore > 0.6\n\nInterpretation:\n• Score 0.0-0.6 = Healthy ✅\n• Score > 0.6 = At Risk ⚠️\n\nIf AT RISK:\n→ Update Epic in Jira\n→ Add \"At Risk\" label\n→ Alert team via Slack\n"
      }
    },
    {
      "id": "7a14fe1b-bd86-4040-8655-0e8d48f5e35e",
      "name": "Update Epic in Jira",
      "type": "n8n-nodes-base.jira",
      "position": [
        -1344,
        1024
      ]
    },
    {
      "id": "dc4eba68-ee7f-4226-8369-3fdeaf7806d7",
      "name": "🔄 Jira Update",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        720
      ],
      "parameters": {
        "width": 280,
        "height": 268,
        "content": "🔄 JIRA UPDATE\n\nUpdates at-risk Epic:\n\n• Sets custom field:\n  customfield_10060 = Health Score\n• Adds label: \"At Risk\"\n• Creates audit trail\n• Visible in Epic view\n\nTeam sees risk status immediately in"
      }
    },
    {
      "id": "48ef861d-0de4-4424-b453-a5a26f94716f",
      "name": "Alert Slack Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1360,
        1200
      ]
    },
    {
      "id": "822fc9ef-2efe-45a5-9bdf-4d4cd5bc14a2",
      "name": "🚨 Slack Alert",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        1168
      ],
      "parameters": {
        "width": 280,
        "height": 268,
        "content": "🚨 SLACK ALERT\n\nSends to: #project-alerts\n\nContains:\n✓ Epic key\n✓ Health score value\n✓ Direct link to Epic in Jira\n✓ Timestamp (automatic)\n\nEnables real-time team notification\nCritical for risk mitigat"
      }
    },
    {
      "id": "cd79db68-7aad-43bf-a436-75e377daa0fa",
      "name": "Update Monday.com Pulse",
      "type": "n8n-nodes-base.mondayCom",
      "position": [
        -1280,
        1552
      ]
    },
    {
      "id": "03da2282-3393-4c2d-b81b-66d8527e2873",
      "name": "📋 Monday Pulse",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        1488
      ],
      "parameters": {
        "width": 280,
        "height": 300,
        "content": "📋 MONDAY.COM PULSE\n\nUpdates Monday.com board with:\n\n• Health score metric\n• Risk status\n• Last updated timestamp\n\nSyncs data across platforms\nKeeps Monday boards current\nPulse shows real-time metrics\n"
      }
    },
    {
      "id": "716d2c3b-5cc4-4358-8f1a-c89844774af6",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1280,
        1760
      ]
    },
    {
      "id": "41c60824-3019-4cc1-8284-1ca48deb52f4",
      "name": "📊 Sheets Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        1920
      ],
      "parameters": {
        "width": 280,
        "height": 332,
        "content": "📊 GOOGLE SHEETS LOG\n\nAppends historical record:\n\nColumns (A:C):\n✓ Timestamp\n✓ Epic Key\n✓ Health Score\n\nUsed for:\n• Trend analysis\n• Risk history\n• Compliance audit\n• Dashboard creation\n• Performance t"
      }
    }
  ],
  "connections": {
    "Trigger Every 6 Hours": {
      "main": [
        [
          {
            "node": "Fetch All Epics from Jira",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Health Score": {
      "main": [
        [
          {
            "node": "Is Score > 0.6 (At Risk)?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Epics from Jira": {
      "main": [
        [
          {
            "node": "Split Epics for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Score > 0.6 (At Risk)?": {
      "main": [
        [
          {
            "node": "Update Epic in Jira",
            "type": "main",
            "index": 0
          },
          {
            "node": "Alert Slack Channel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Monday.com Pulse",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Epic + Linked Issues": {
      "main": [
        [
          {
            "node": "Calculate Health Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Epics for Processing": {
      "main": [
        [
          {
            "node": "Fetch Epic + Linked Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}