{
  "name": "Score Zoho support tickets with OpenAI and sync upsell alerts to Zoho CRM",
  "nodes": [
    {
      "id": "aa5b4e0f-d983-4dcd-8ce6-976fbe954952",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -384,
        48
      ]
    },
    {
      "id": "b8312637-e1ff-4292-a4cf-3873f2223985",
      "name": "Get Customer Record",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        112,
        48
      ]
    },
    {
      "id": "58e96af5-7ff7-4262-a9d3-b3d3366f07e0",
      "name": "Create Customer Record",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        560,
        -16
      ]
    },
    {
      "id": "954c323f-e6eb-402f-aa48-6163958709e3",
      "name": "Update Customer Record",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        560,
        144
      ]
    },
    {
      "id": "912fb40b-7306-4bd7-83e6-001311124592",
      "name": "Get Ticket History",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        816,
        48
      ]
    },
    {
      "id": "fb55df13-4907-47cf-8caa-15a3ba784400",
      "name": "Analyze Ticket Patterns",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1344,
        48
      ]
    },
    {
      "id": "f1c0e66c-6785-4b1f-928b-a870d9b61620",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1536,
        288
      ]
    },
    {
      "id": "b5989543-afc8-4ebe-8e37-2b2bc08dde44",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -608,
        48
      ]
    },
    {
      "id": "1fd2b964-92b8-4ab2-8f00-03bf6f9eb553",
      "name": "Upsell Opportunity?",
      "type": "n8n-nodes-base.if",
      "position": [
        2224,
        48
      ]
    },
    {
      "id": "3e085ca5-8b87-4203-97a6-c69bf68e540d",
      "name": "Alert Account Manager",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2544,
        32
      ]
    },
    {
      "id": "50f5920b-2fc8-4306-8dc7-763d3eafc7a2",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1312,
        288
      ]
    },
    {
      "id": "0af08391-fc27-4410-b0f9-98bb60da3859",
      "name": "Customer Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        304,
        48
      ]
    },
    {
      "id": "26f78ef4-4d9e-4931-8dc4-1e3028ff698e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -240
      ],
      "parameters": {
        "width": 496,
        "height": 608,
        "content": "# How It Works\n### This workflow automates support ticket analysis by syncing incoming data with Zoho CRM and using AI to identify customer sentiment and high-potential upsell opportunities.\n# Setup S"
      }
    },
    {
      "id": "c7ca76f4-c830-4ef9-8999-b234740f8c7f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -192
      ],
      "parameters": {
        "width": 768,
        "height": 512,
        "content": "## Webhook Trigger on On Ticket Add/Edit & Set Configuration\nThe automation process begins with a Webhook Trigger that listens for incoming POST requests containing support ticket details such as subj"
      }
    },
    {
      "id": "1442106d-dd21-4639-a36a-bfa57145894e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -192
      ],
      "parameters": {
        "width": 1008,
        "height": 576,
        "content": "## CRM Data Synchronization and History Retrieval\nThis section of the workflow manages Zoho CRM data synchronization by searching for a matching customer record, verifying its existence through a cond"
      }
    },
    {
      "id": "c6e053e7-7211-4822-97d0-b4a24b6c60ab",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -192
      ],
      "parameters": {
        "width": 864,
        "height": 640,
        "content": "## AI-Driven Ticket Analysis and Pattern Recognition\nThis segment utilizes an AI Agent powered by a large language model to evaluate current support tickets and historical customer data to identify re"
      }
    },
    {
      "id": "445044cc-6204-4dff-9f63-061e7dcdf563",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -176
      ],
      "parameters": {
        "width": 784,
        "height": 544,
        "content": "## Opportunity Filtering and Stakeholder Notification\nThis final stage filters the AI's findings by verifying if a legitimate opportunity exists and if the calculated score meets the predefined thresh"
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Exists?": {
      "main": [
        [
          {
            "node": "Update Customer Record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Customer Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Ticket Patterns",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Ticket History": {
      "main": [
        [
          {
            "node": "Analyze Ticket Patterns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Customer Record": {
      "main": [
        [
          {
            "node": "Customer Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsell Opportunity?": {
      "main": [
        [
          {
            "node": "Alert Account Manager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Customer Record": {
      "main": [
        [
          {
            "node": "Get Ticket History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Customer Record": {
      "main": [
        [
          {
            "node": "Get Ticket History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get Customer Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Ticket Patterns": {
      "main": [
        [
          {
            "node": "Upsell Opportunity?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Ticket Patterns",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}