{
  "name": "Automate customer support issue resolution using AI text classifier",
  "nodes": [
    {
      "id": "645799b0-7ddb-4acb-a95d-3b04eadff445",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1480,
        20
      ]
    },
    {
      "id": "e2923385-2f73-439c-9d5c-5a3c560993cb",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2040,
        420
      ]
    },
    {
      "id": "c24728f9-73b9-45f7-9c4e-aee872c59714",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3180,
        -80
      ]
    },
    {
      "id": "0bc19e46-4a65-45fb-9571-d1f00d204c63",
      "name": "OpenAI Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2060,
        -261
      ]
    },
    {
      "id": "0c631234-125d-476b-b97a-2837d6a32f2b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -272,
        -180
      ]
    },
    {
      "id": "96c9931d-d286-42f8-9629-2641eaa368b9",
      "name": "Get Issue Comments",
      "type": "n8n-nodes-base.jira",
      "position": [
        748,
        -180
      ]
    },
    {
      "id": "18a2770d-5240-4837-8837-4821f73ec560",
      "name": "Close Issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        2660,
        -741
      ]
    },
    {
      "id": "83e81448-26c7-4c29-a17a-409c53e05881",
      "name": "Send Reminder",
      "type": "n8n-nodes-base.jira",
      "position": [
        3500,
        -220
      ]
    },
    {
      "id": "5fed9245-4af9-4de7-b021-750d2ba39e63",
      "name": "Join Comments",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        928,
        -180
      ]
    },
    {
      "id": "34712dd3-0348-4709-8a68-07279242910c",
      "name": "Add Autoclose Message",
      "type": "n8n-nodes-base.jira",
      "position": [
        2460,
        -561
      ]
    },
    {
      "id": "c43a3b66-838b-4970-a85f-dc0370437388",
      "name": "Ask For Feedback Message",
      "type": "n8n-nodes-base.jira",
      "position": [
        2460,
        -741
      ]
    },
    {
      "id": "3223ce45-9e5e-471c-9015-75e9f28088e9",
      "name": "Simplify Thread For AI",
      "type": "n8n-nodes-base.set",
      "position": [
        1108,
        -180
      ]
    },
    {
      "id": "e6f91099-1fe6-4930-8dda-b19330edb599",
      "name": "Solution Found?",
      "type": "n8n-nodes-base.if",
      "position": [
        2440,
        220
      ]
    },
    {
      "id": "696348a5-c955-47eb-ab44-f56652587944",
      "name": "Reply to Issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        2760,
        220
      ]
    },
    {
      "id": "4d4562c7-f5ed-44b8-9292-9c1a75d51173",
      "name": "Last Message is Not Bot",
      "type": "n8n-nodes-base.if",
      "position": [
        3000,
        -220
      ]
    },
    {
      "id": "e1ca19da-c030-478b-a488-dcb08d9be97e",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2400,
        420
      ]
    },
    {
      "id": "596ef421-beb0-4523-a313-3f6ccd9e8f0c",
      "name": "Get Issue Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        568,
        -180
      ]
    },
    {
      "id": "23bb0cf8-c682-416c-a809-e9ca6fc480ef",
      "name": "Notify Slack Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        2600,
        380
      ]
    },
    {
      "id": "21076f8f-8462-4a5a-8831-709a138639c5",
      "name": "Close Issue2",
      "type": "n8n-nodes-base.jira",
      "position": [
        2920,
        220
      ]
    },
    {
      "id": "6c9b30c5-d061-4b4d-b4fa-596ca0768297",
      "name": "Get List of Unresolved Long Lived Issues",
      "type": "n8n-nodes-base.jira",
      "position": [
        -72,
        -180
      ]
    },
    {
      "id": "1c6c2919-c48b-47bb-a975-f184bd9e95dd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -337.3183708039286,
        -425.6402206027777
      ],
      "parameters": {
        "width": 640.6500163735489,
        "height": 484.114789072283,
        "content": "## 1. Search For Unresolved Long-lived JIRA Issues\n[Learn more about the JIRA node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.jira)\n\nIn this demonstration, we'll define \"long-l"
      }
    },
    {
      "id": "f21d95a7-0cef-4110-a3b9-59c562b2ea24",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        128,
        -180
      ]
    },
    {
      "id": "e9f9e6e6-c66d-4e50-b4d4-3931b8cf40c9",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        388,
        -180
      ]
    },
    {
      "id": "91b5e024-6141-47e8-99ff-9ac25df7df48",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -353.43597793972225
      ],
      "parameters": {
        "width": 956.5422324510927,
        "height": 411.91054640922755,
        "content": "## 2. Retrieves and Combine JIRA Issue Comments\n[Learn more about the JIRA node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.jira)\n\nTo provide the necessary information for our A"
      }
    },
    {
      "id": "9b545aa8-d2df-4500-8af0-ee55b0fcc736",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -381.8893508540474
      ],
      "parameters": {
        "width": 653.0761795166852,
        "height": 583.0290516595711,
        "content": "## 3. Classify the Current State of the Issue\n[Learn more about the Text Classifier node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier)\n\nToday'"
      }
    },
    {
      "id": "abe0da8f-4107-4641-b992-1a31f71ce530",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        -820
      ],
      "parameters": {
        "width": 896.1509781357872,
        "height": 726.4699654775604,
        "content": "## 4. Sentiment Analysis on Issue Resolution\n[Read more about the Sentiment Analysis node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.sentimentanalysis)\n\nThe"
      }
    },
    {
      "id": "d9c97501-e2cf-4a7e-86cc-c295d69db939",
      "name": "Customer Satisfaction Agent",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        2060,
        -400
      ]
    },
    {
      "id": "2829d591-8347-4683-be10-663872c08546",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        -60
      ],
      "parameters": {
        "width": 1120.504487917144,
        "height": 675.5857025907994,
        "content": "## 5. Attempt to Resolve The Issue With KnowledgeBase\n[Read more about the AI Agent node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nWhen the issue "
      }
    },
    {
      "id": "112c9fd3-c104-4a68-8e58-96a317fef854",
      "name": "KnowledgeBase Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2060,
        220
      ]
    },
    {
      "id": "c27e0679-29a0-45d7-ada7-9727975b5069",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2900,
        -421.245651256349
      ],
      "parameters": {
        "width": 801.0347525891818,
        "height": 507.581094640126,
        "content": "## 6. Notify for Unanswered Questions or Response Waiting\n[Read more about the Basic LLM Chain node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nI"
      }
    },
    {
      "id": "0a7da82e-789b-401c-80d0-de3ade51942c",
      "name": "Issue Reminder Agent",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3180,
        -220
      ]
    },
    {
      "id": "2847136e-b95b-4906-89af-ceb180abb9b0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -560
      ],
      "parameters": {
        "width": 454.99286536248565,
        "height": 619.151728428442,
        "content": "## Try It Out!\n\n### This n8n template is designed to assist and improve customer support team member capacity by automating the resolution of long-lived and forgotten JIRA issues.\n\n* Schedule Trigger "
      }
    },
    {
      "id": "9edb0847-5dcf-4357-a1d4-537a126e277b",
      "name": "Find Simlar Issues",
      "type": "n8n-nodes-base.jiraTool",
      "position": [
        2160,
        420
      ]
    },
    {
      "id": "573c1b75-35ae-40f0-aa6e-c1372f83569b",
      "name": "Query KnowledgeBase",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        2280,
        420
      ]
    },
    {
      "id": "1274f6ff-16d9-4d86-b75a-59755390a07c",
      "name": "Report Unhappy Resolution",
      "type": "n8n-nodes-base.slack",
      "position": [
        2660,
        -400
      ]
    },
    {
      "id": "3226d576-c3ae-444a-b0c5-ac797d25dd2e",
      "name": "Classify Current Issue State",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        1480,
        -140
      ]
    }
  ],
  "connections": {
    "Join Comments": {
      "main": [
        [
          {
            "node": "Simplify Thread For AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply to Issue": {
      "main": [
        [
          {
            "node": "Close Issue2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solution Found?": {
      "main": [
        [
          {
            "node": "Reply to Issue",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Slack Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get List of Unresolved Long Lived Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Classify Current Issue State",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Find Simlar Issues": {
      "ai_tool": [
        [
          {
            "node": "KnowledgeBase Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Issue Comments": {
      "main": [
        [
          {
            "node": "Join Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Issue Metadata": {
      "main": [
        [
          {
            "node": "Get Issue Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "KnowledgeBase Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Issue Reminder Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Customer Satisfaction Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "KnowledgeBase Agent": {
      "main": [
        [
          {
            "node": "Solution Found?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query KnowledgeBase": {
      "ai_tool": [
        [
          {
            "node": "KnowledgeBase Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Issue Reminder Agent": {
      "main": [
        [
          {
            "node": "Send Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Slack Channel": {
      "main": [
        [
          {
            "node": "Reply to Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Autoclose Message": {
      "main": [
        [
          {
            "node": "Close Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simplify Thread For AI": {
      "main": [
        [
          {
            "node": "Classify Current Issue State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Last Message is Not Bot": {
      "main": [
        [
          {
            "node": "Issue Reminder Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask For Feedback Message": {
      "main": [
        [
          {
            "node": "Close Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Get Issue Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "KnowledgeBase Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Customer Satisfaction Agent": {
      "main": [
        [
          {
            "node": "Ask For Feedback Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Autoclose Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Report Unhappy Resolution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Current Issue State": {
      "main": [
        [
          {
            "node": "Customer Satisfaction Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Last Message is Not Bot",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "KnowledgeBase Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get List of Unresolved Long Lived Issues": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}