{
  "name": "Auto-assign support tickets with JIRA, Supabase and AI",
  "nodes": [
    {
      "id": "cce90ce3-5661-4c8b-9752-71bc0e643f01",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1880,
        -180
      ]
    },
    {
      "id": "9f39b744-e3d5-4cb8-9631-d41ccb311e57",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -840,
        -260
      ]
    },
    {
      "id": "fd6f3243-3c94-4208-b200-511eef53f2f7",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -700,
        -260
      ]
    },
    {
      "id": "d577536e-bee5-45ea-929e-951f4a255462",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        -600,
        -140
      ]
    },
    {
      "id": "5fb95703-27aa-4ae3-b220-b2cca3596e0d",
      "name": "Issues Similarity Database",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        -840,
        -440
      ]
    },
    {
      "id": "94d53f32-7f01-487f-b1a3-0dc15f8dc673",
      "name": "Supabase Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        -540,
        500
      ]
    },
    {
      "id": "d1c88dcd-62ef-4bb8-86d4-1ef294bb063d",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -460,
        620
      ]
    },
    {
      "id": "a23442f6-c701-4b47-aea4-8764adab3d8d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -680,
        500
      ]
    },
    {
      "id": "d07139dd-9df4-4e95-a0b0-4e28054b62c9",
      "name": "Find Similar Issues + Assignees",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -660,
        300
      ]
    },
    {
      "id": "c28e06eb-a8bd-4abc-821d-5efee7bbdf99",
      "name": "Check User Workflow",
      "type": "n8n-nodes-base.jira",
      "position": [
        880,
        580
      ]
    },
    {
      "id": "6bcad177-dc47-42f3-893d-5d64f28b8d75",
      "name": "For Each User",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        680,
        380
      ]
    },
    {
      "id": "5112d1da-464a-42e9-9d76-1e6064f1ebfc",
      "name": "Assign User to Ticket",
      "type": "n8n-nodes-base.jira",
      "position": [
        1520,
        620
      ]
    },
    {
      "id": "4063032d-5103-4b24-b04c-db3e1ba1002f",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1520,
        300
      ]
    },
    {
      "id": "44a07e61-6edd-4beb-b7e3-4c7474cb620f",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -1380,
        -220
      ]
    },
    {
      "id": "1084ffd4-99a6-4a10-a209-1c6c83d0df02",
      "name": "Collect Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        -220
      ]
    },
    {
      "id": "5109b7f5-61e1-4634-b29c-276c9c4fff23",
      "name": "Get Unassigned Tickets more than 5 days",
      "type": "n8n-nodes-base.jira",
      "position": [
        -1340,
        300
      ]
    },
    {
      "id": "7fcd1b7e-4bcd-4d09-b306-dd5b5de685e0",
      "name": "For Each Issue",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1040,
        300
      ]
    },
    {
      "id": "eed6d212-daae-49ee-81e9-0b550cb3a34c",
      "name": "Issue Ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -840,
        300
      ]
    },
    {
      "id": "041949bc-ad09-45bb-acc0-915092cde6ad",
      "name": "Add Comment to Issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        1700,
        620
      ]
    },
    {
      "id": "ccb525d9-fc6e-47f3-ac2a-dde4c266962b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1620,
        -460
      ],
      "parameters": {
        "width": 580,
        "height": 460,
        "content": "## 1. Get Resolved Issues\n[Learn more about the JIRA node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.jira/)\n\nTo build our database of successfully resolved issues, we can pull "
      }
    },
    {
      "id": "c4868156-e663-46b1-8979-b561dcb0620b",
      "name": "Last 50 Resolved",
      "type": "n8n-nodes-base.jira",
      "position": [
        -1560,
        -220
      ]
    },
    {
      "id": "bdf6c882-7a91-485a-9f75-4c27ba5b936c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -660
      ],
      "parameters": {
        "width": 660,
        "height": 660,
        "content": "## 2. Create Search Index In Vector Database\n[Learn more about the Supabase Vector Store](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase)\n\nSu"
      }
    },
    {
      "id": "806a7ac1-999b-49f7-94b4-386341a2a4e1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1620,
        80
      ],
      "parameters": {
        "width": 500,
        "height": 460,
        "content": "## 3. Watch for Stale Unassigned Issues\n[Read more about the Scheduled Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/)\n\nHere, we're using a scheduled trig"
      }
    },
    {
      "id": "28c2f824-868d-4b0b-b362-7cfa31ad23d6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        80
      ],
      "parameters": {
        "width": 1380,
        "height": 700,
        "content": "## 4. Find Similar Issues which have been Resolved\n[Learn more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nOur first step is to find"
      }
    },
    {
      "id": "91134c07-9df5-4a01-ab69-b9461698e260",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        120
      ],
      "parameters": {
        "width": 800,
        "height": 720,
        "content": "## 5. Work out which Knowledgeable Team Member has most Capacity\n[Learn more about the Summarize node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.summarize/)\n\nIf we've found si"
      }
    },
    {
      "id": "3a7e0c75-148d-4bef-ab2a-ef2246c369d6",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        360
      ],
      "parameters": {
        "width": 560,
        "height": 480,
        "content": "## 6. Auto-assign Stale Issue to Team Member\n[Learn more about the JIRA node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.jira/)\n\nFinally, we'll auto-assign the team member to th"
      }
    },
    {
      "id": "9af64316-0380-4a23-8935-a58a829e9064",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -200,
        440
      ]
    },
    {
      "id": "f67f4290-b7f7-4034-9c78-3ff38cbb256f",
      "name": "Issues to Items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        20,
        300
      ]
    },
    {
      "id": "20582918-7638-4b07-8aec-ad30412b2879",
      "name": "To Structured Output",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -300,
        300
      ]
    },
    {
      "id": "bd950805-811f-49d0-9a32-a54cf647e819",
      "name": "Count Assigned Open Issues per User",
      "type": "n8n-nodes-base.summarize",
      "position": [
        880,
        380
      ]
    },
    {
      "id": "fddbc5de-21a2-434e-ab1c-c6b06d96d2c7",
      "name": "Tally In-Progress Issues per User",
      "type": "n8n-nodes-base.set",
      "position": [
        1080,
        580
      ]
    },
    {
      "id": "1bde2079-2c61-4024-889e-178afede1bf4",
      "name": "Sort By Most Capacity",
      "type": "n8n-nodes-base.sort",
      "position": [
        1080,
        380
      ]
    },
    {
      "id": "22691a79-fa71-40b6-b4f8-bcd82864dce5",
      "name": "If has Items?",
      "type": "n8n-nodes-base.if",
      "position": [
        180,
        300
      ]
    },
    {
      "id": "8030303e-97ce-4ab2-8f3f-ae44f82c6815",
      "name": "Skip",
      "type": "n8n-nodes-base.noOp",
      "position": [
        340,
        620
      ]
    },
    {
      "id": "6245bd37-15ce-4c3c-9430-8708e5be5b13",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        620
      ],
      "parameters": {
        "width": 360,
        "height": 120,
        "content": "### What is no similar issues are found?\nThis is beyond the scope of this template so we'll skip the issue but in this situation, you may want to escalate to the project manager instead."
      }
    },
    {
      "id": "8919a9c2-063e-4d69-977b-e0c3f1e28c50",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2140,
        -1080
      ],
      "parameters": {
        "width": 480,
        "height": 1080,
        "content": "## Try it out\n### This n8n template builds a simple automation to ensure no JIRA issues go unassigned for more than a week to prevent them falling through the cracks. It uses AI to perform searching t"
      }
    }
  ],
  "connections": {
    "Skip": {
      "main": [
        [
          {
            "node": "For Each Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Issue Ref": {
      "main": [
        [
          {
            "node": "Find Similar Issues + Assignees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each User": {
      "main": [
        [
          {
            "node": "Count Assigned Open Issues per User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check User Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If has Items?": {
      "main": [
        [
          {
            "node": "For Each User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Skip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Fields": {
      "main": [
        [
          {
            "node": "Issues Similarity Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each Issue": {
      "main": [
        [],
        [
          {
            "node": "Issue Ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Issues to Items": {
      "main": [
        [
          {
            "node": "If has Items?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Last 50 Resolved": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Last 50 Resolved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Issues Similarity Database",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Find Similar Issues + Assignees",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Collect Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get Unassigned Tickets more than 5 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "To Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check User Workflow": {
      "main": [
        [
          {
            "node": "Tally In-Progress Issues per User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Issues Similarity Database",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Add Comment to Issue": {
      "main": [
        [
          {
            "node": "For Each Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To Structured Output": {
      "main": [
        [
          {
            "node": "Issues to Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign User to Ticket": {
      "main": [
        [
          {
            "node": "Add Comment to Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort By Most Capacity": {
      "main": [
        [
          {
            "node": "Assign User to Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "ai_tool": [
        [
          {
            "node": "Find Similar Issues + Assignees",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Find Similar Issues + Assignees": {
      "main": [
        [
          {
            "node": "To Structured Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Tally In-Progress Issues per User": {
      "main": [
        [
          {
            "node": "For Each User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Assigned Open Issues per User": {
      "main": [
        [
          {
            "node": "Sort By Most Capacity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Unassigned Tickets more than 5 days": {
      "main": [
        [
          {
            "node": "For Each Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}