{
  "name": "Predict customer churn risk & create interventions with GPT-4, Zendesk & HubSpot",
  "nodes": [
    {
      "id": "12cc91e8-fd72-41ff-b6f6-843b39b202d2",
      "name": "Overview & Purpose",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        96
      ],
      "parameters": {
        "width": 320,
        "height": 200,
        "content": "## 🔮 AI Customer Success Risk Prediction Workflow\n\n**Purpose:** Predict customer churn risk 30-90 days early using AI analysis of multiple data signals, then automatically create personalized interven"
      }
    },
    {
      "id": "365de93c-898a-476e-a3ee-d80875707f01",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        368
      ],
      "parameters": {
        "width": 320,
        "height": 220,
        "content": "## 🎯 Setup & Configuration\n\n**Required Environment Variables:**\n- `MIXPANEL_PROJECT_ID` (or analytics tool)\n- `HIGH_RISK_SLACK_CHANNEL`\n- `CS_TEAM_EMAIL`\n- `OPENAI_MODEL_VERSION`\n\n**Credentials Needed"
      }
    },
    {
      "id": "fd8d7b52-6862-410f-bb02-f1bd234060ce",
      "name": "AI Analysis Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        96
      ],
      "parameters": {
        "width": 320,
        "height": 240,
        "content": "## 🧠 AI Risk Analysis Logic\n\n**Data Sources Combined:**\n- Product usage trends (logins, feature usage, session duration)\n- Support ticket sentiment & frequency\n- Payment patterns & billing issues\n- Em"
      }
    },
    {
      "id": "b3b1cfa4-cb6f-423c-9cee-a8d2b860c8bb",
      "name": "Daily Risk Analysis",
      "type": "n8n-nodes-base.cron",
      "position": [
        736,
        560
      ]
    },
    {
      "id": "ba458527-4372-4674-a99a-f792fd52e343",
      "name": "Fetch Product Usage Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        368
      ]
    },
    {
      "id": "9d0fc88a-5df1-4436-8adc-7631918a5c53",
      "name": "Fetch Support Tickets",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        960,
        560
      ]
    },
    {
      "id": "84229a28-d043-4271-93cd-9c35caaa8a41",
      "name": "Fetch Billing Data",
      "type": "n8n-nodes-base.stripe",
      "position": [
        960,
        752
      ]
    },
    {
      "id": "674fb095-502e-45a4-8283-0f2d7f4b5646",
      "name": "Merge All Data Sources",
      "type": "n8n-nodes-base.merge",
      "position": [
        1184,
        464
      ]
    },
    {
      "id": "3a258f57-473d-4dba-b6c2-9323bad7fab4",
      "name": "AI Risk Prediction",
      "type": "n8n-nodes-base.aiTransform",
      "position": [
        1408,
        464
      ]
    },
    {
      "id": "8fb5b97d-94b3-4249-82b8-a75d87666578",
      "name": "Route by Risk Level",
      "type": "n8n-nodes-base.if",
      "position": [
        1632,
        464
      ]
    },
    {
      "id": "0b044e5d-7071-4621-b25a-6c2a2d0b4ba7",
      "name": "Check High Risk",
      "type": "n8n-nodes-base.if",
      "position": [
        1856,
        560
      ]
    },
    {
      "id": "45dcc6f5-ad2b-4e11-829b-bd6393e20062",
      "name": "Generate Critical Intervention",
      "type": "n8n-nodes-base.aiTransform",
      "position": [
        2080,
        208
      ]
    },
    {
      "id": "ba69f187-e251-43b9-a575-40c452b565ac",
      "name": "Critical Risk Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1856,
        352
      ]
    },
    {
      "id": "56ff908b-337f-4287-ac06-bebcbd467c44",
      "name": "Generate High Risk Intervention",
      "type": "n8n-nodes-base.aiTransform",
      "position": [
        2080,
        512
      ]
    },
    {
      "id": "4d065f87-c832-467b-9892-c78a612e1824",
      "name": "Send Personalized Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2304,
        592
      ]
    },
    {
      "id": "fb61c43d-f77c-4a02-9219-33d2784ad975",
      "name": "Update CRM with Risk Data",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2304,
        368
      ]
    },
    {
      "id": "835e4d22-7d99-47d6-8275-461513310a94",
      "name": "Generate Medium Risk Check-in",
      "type": "n8n-nodes-base.aiTransform",
      "position": [
        2080,
        752
      ]
    }
  ],
  "connections": {
    "Check High Risk": {
      "main": [
        [
          {
            "node": "Generate High Risk Intervention",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Medium Risk Check-in",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Risk Prediction": {
      "main": [
        [
          {
            "node": "Route by Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Risk Analysis": {
      "main": [
        [
          {
            "node": "Fetch Product Usage Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Support Tickets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Billing Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Risk Level": {
      "main": [
        [
          {
            "node": "Generate Critical Intervention",
            "type": "main",
            "index": 0
          },
          {
            "node": "Critical Risk Slack Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check High Risk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Support Tickets": {
      "main": [
        [
          {
            "node": "Merge All Data Sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge All Data Sources": {
      "main": [
        [
          {
            "node": "AI Risk Prediction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Usage Data": {
      "main": [
        [
          {
            "node": "Merge All Data Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Medium Risk Check-in": {
      "main": [
        [
          {
            "node": "Send Personalized Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update CRM with Risk Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Critical Intervention": {
      "main": [
        [
          {
            "node": "Send Personalized Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update CRM with Risk Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate High Risk Intervention": {
      "main": [
        [
          {
            "node": "Send Personalized Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update CRM with Risk Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}