{
  "name": "Prioritize Zendesk tickets with GPT-4 analysis and Slack alerts",
  "nodes": [
    {
      "id": "6d945286-6889-45c1-9f64-be5c704f9b87",
      "name": "Zendesk Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        660,
        40
      ]
    },
    {
      "id": "52dc8682-3625-414b-a298-e5c9a2516d4e",
      "name": "Workflow Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -200
      ],
      "parameters": {
        "width": 432,
        "height": 464,
        "content": "## 🎫 Zendesk AI Ticket Prioritization Workflow\n\n**What this workflow does:**\nAutomatically analyzes incoming Zendesk tickets using OpenAI to determine urgency levels and sends Slack alerts for high-pr"
      }
    },
    {
      "id": "16a1998f-dc1a-42a2-8a37-996f34172dee",
      "name": "Extract Data Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -200
      ],
      "parameters": {
        "width": 280,
        "height": null,
        "content": "📝 **Step 1: Extract Ticket Data**\n\nExtracts key information from the Zendesk webhook:\n- Ticket ID and subject\n- Customer details\n- Ticket content/description\n- Current priority\n- Created timestamp\n\nTh"
      }
    },
    {
      "id": "58eef0e2-c7e3-4fee-a00c-0bd17aff3c2f",
      "name": "Extract Ticket Data",
      "type": "n8n-nodes-base.set",
      "position": [
        900,
        40
      ]
    },
    {
      "id": "9ffd84f6-7b57-413f-8863-f236304fad87",
      "name": "AI Analysis Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -200
      ],
      "parameters": {
        "width": 280,
        "height": 180,
        "content": "🤖 **Step 2: AI Analysis**\n\nUses OpenAI GPT-4 to analyze ticket urgency:\n- Sentiment analysis\n- Keyword detection\n- Context understanding\n- Priority scoring (1-5)\n\nThe AI considers factors like:\n- Emot"
      }
    },
    {
      "id": "7d0a3e7c-2634-4fbc-9706-02bdac34e80c",
      "name": "Analyze Ticket with OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1140,
        40
      ]
    },
    {
      "id": "e537d024-ce4d-480e-bfc1-33ff656b3f64",
      "name": "Process Response Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -200
      ],
      "parameters": {
        "width": 280,
        "height": null,
        "content": "⚙️ **Step 3: Process AI Response**\n\nParses the AI response and extracts:\n- Urgency score (1-5)\n- Priority classification\n- Key urgency indicators\n- Recommended response time\n\nAlso determines if Slack "
      }
    },
    {
      "id": "eb826f0a-1d6e-4e0f-ad8f-91da5fcfb442",
      "name": "Process AI Analysis",
      "type": "n8n-nodes-base.code",
      "position": [
        1380,
        40
      ]
    },
    {
      "id": "c079c4a4-ec70-4738-86d5-cef2c18cbfdb",
      "name": "Update Zendesk Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        -200
      ],
      "parameters": {
        "width": 280,
        "height": 140,
        "content": "🏷️ **Step 4: Update Zendesk**\n\nUpdates the ticket with:\n- New priority level\n- AI analysis tags\n- Priority reasoning in private note\n\nUses Zendesk API to maintain audit trail."
      }
    },
    {
      "id": "9b212cff-afe1-48e4-877b-b46a0a77b676",
      "name": "Update Zendesk Ticket",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        1620,
        40
      ]
    },
    {
      "id": "e93dfce0-fbd7-42be-abdb-e2001be5fb3f",
      "name": "Check if High Priority",
      "type": "n8n-nodes-base.if",
      "position": [
        1860,
        40
      ]
    },
    {
      "id": "12cb1668-828c-4e99-b204-d5cdaa663d1f",
      "name": "Slack Notification Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -180
      ],
      "parameters": {
        "width": 280,
        "height": null,
        "content": "🔔 **Step 5: Slack Notification**\n\nSends urgent ticket alerts to Slack when:\n- Urgency score is 4 or 5\n- High business impact detected\n- Critical keywords found\n\nIncludes ticket details and direct link"
      }
    },
    {
      "id": "7be5729c-1b6b-4f0b-a9e6-1092a9106529",
      "name": "Send Urgent Alert to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2060,
        0
      ]
    },
    {
      "id": "d563ed0f-46be-4fb4-9c1a-3bd42fe949bc",
      "name": "Response Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2260,
        -180
      ],
      "parameters": {
        "width": 280,
        "height": null,
        "content": "✅ **Step 6: Completion Response**\n\nSends success response back to Zendesk webhook confirming:\n- Ticket processed successfully\n- Priority assigned\n- Notifications sent (if applicable)\n\nThis ensures pro"
      }
    },
    {
      "id": "b56c81c7-b312-4f00-9903-8abefca85de0",
      "name": "Webhook Response - Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2300,
        0
      ]
    },
    {
      "id": "7138e8b6-547e-4001-bb22-fef7d3f3ff6c",
      "name": "Webhook Response - Normal",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2300,
        120
      ]
    },
    {
      "id": "3ea300f9-6418-4f7e-9974-4b5371e6889c",
      "name": "Configuration Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        240
      ]
    },
    {
      "id": "8382f894-763b-4e22-84b9-40dcbaec5195",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        240
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "⚙️ **CONFIGURATION REQUIRED**\n\n**Before using this workflow:**\n\n1. **Set up credentials:**\n   - OpenAI API key\n   - Zendesk API credentials\n   - Slack API token\n\n2. **Update Configuration Variables no"
      }
    }
  ],
  "connections": {
    "Extract Ticket Data": {
      "main": [
        [
          {
            "node": "Analyze Ticket with OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process AI Analysis": {
      "main": [
        [
          {
            "node": "Update Zendesk Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Zendesk Ticket": {
      "main": [
        [
          {
            "node": "Check if High Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if High Priority": {
      "main": [
        [
          {
            "node": "Send Urgent Alert to Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Webhook Response - Normal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration Variables": {
      "main": [
        [
          {
            "node": "Extract Ticket Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zendesk Webhook Trigger": {
      "main": [
        [
          {
            "node": "Configuration Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Ticket with OpenAI": {
      "main": [
        [
          {
            "node": "Process AI Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Urgent Alert to Slack": {
      "main": [
        [
          {
            "node": "Webhook Response - Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}