{
  "name": "Customer Support Channel and Ticketing System with Slack and Linear",
  "nodes": [
    {
      "id": "2b3112a9-046e-4aae-8fcc-95bddf3bb02e",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        828,
        327
      ]
    },
    {
      "id": "65fd6821-4d19-436c-81d9-9bdb0f5efddd",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1920,
        480
      ]
    },
    {
      "id": "85125704-7363-40de-af84-f267f8c7e919",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2100,
        480
      ]
    },
    {
      "id": "eda8851a-1929-4f2f-9149-627c0fe62fbc",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        628,
        327
      ]
    },
    {
      "id": "ad0d56b5-5caf-4fc0-bdbb-4e6207e4eb03",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        112.87898199907983
      ],
      "parameters": {
        "width": 432.4578914269739,
        "height": 427.09547550768553,
        "content": "## 1. Query Slack for Messages \n[Read more about the Slack Trigger](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\nSlack API search uses the same search syntax found in the "
      }
    },
    {
      "id": "d4ebe5b3-6d9a-4547-8af8-0985206c4ca4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        180.44851541532478
      ],
      "parameters": {
        "width": 711.6907825442045,
        "height": 632.7258798316449,
        "content": "## 2. Decide If We Need to Create a New Ticket \n[Read more about using Linear](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.linear)\n\nFor generated issues, we add the message id to"
      }
    },
    {
      "id": "b2920271-6698-47a4-8cac-ea4cec7b47d6",
      "name": "Get Values",
      "type": "n8n-nodes-base.set",
      "position": [
        1100,
        360
      ]
    },
    {
      "id": "c4a4db2a-5d1c-4726-8c98-aef57fdcfaa6",
      "name": "Create New Ticket?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        360
      ]
    },
    {
      "id": "46acb0de-1df1-4116-8aaf-704ec6644d7c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1780,
        80
      ],
      "parameters": {
        "width": 530.6864600881105,
        "height": 578.3950618708791,
        "content": "## 3. Use AI to Generate Ticket Contents\n[Read more about using Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nFor this demo, we've i"
      }
    },
    {
      "id": "503d4ae7-9d5b-4dab-94a2-da28bc0e49da",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        120
      ],
      "parameters": {
        "width": 359.6648027457353,
        "height": 400.4748439127683,
        "content": "## Try It Out!\n### This workflow does the following:\n* Monitors a Slack channel for new user messages asking for assistance\n* Only user messages which are tagged with the ticket(🎫) emoji are processed"
      }
    },
    {
      "id": "11e423a4-36b6-4ecd-8bf7-58a7d4a1aa9a",
      "name": "Get Existing Issues",
      "type": "n8n-nodes-base.linear",
      "position": [
        1260,
        360
      ]
    },
    {
      "id": "413fde96-346a-468e-80b7-d465bd8add14",
      "name": "Generate Ticket Using ChatGPT",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1920,
        320
      ]
    },
    {
      "id": "66aecf53-6e8a-4ee8-88c3-be6b7d8d0527",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2340,
        206
      ],
      "parameters": {
        "width": 374.7406065828194,
        "height": 352.3865785298774,
        "content": "## 4. Create New Ticket in Linear\n[Read more about using Linear](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.linear)\n\nWith our ticket contents generated, we can now create our ti"
      }
    },
    {
      "id": "f7898b7b-f60a-4315-a870-8c8ec4ad848f",
      "name": "Create Ticket",
      "type": "n8n-nodes-base.linear",
      "position": [
        2480,
        380
      ]
    },
    {
      "id": "0b706c12-6ce0-41af-ad4b-9d98d7d03a41",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1440,
        360
      ]
    },
    {
      "id": "d5b30127-f237-459d-860a-2589e3b54fb8",
      "name": "Get Hashes Only",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        640
      ]
    },
    {
      "id": "9de103e1-b6a4-4454-b1b9-73eff730fcb6",
      "name": "Collect Descriptions",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1260,
        500
      ]
    },
    {
      "id": "af34916f-7888-4d41-aee6-752b78e88c0c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        300
      ],
      "parameters": {
        "width": 204.96868508214473,
        "height": 296.735132421306,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the Slack channel to monitor here."
      }
    },
    {
      "id": "58ab44f7-5fe5-4804-8bf1-36f351d86528",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2440,
        360
      ],
      "parameters": {
        "width": 183.49787916474958,
        "height": 296.735132421306,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the Linear Team Name or ID here."
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create New Ticket?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack": {
      "main": [
        [
          {
            "node": "Get Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Values": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Existing Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Hashes Only": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Ticket Using ChatGPT",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create New Ticket?": {
      "main": [
        [
          {
            "node": "Generate Ticket Using ChatGPT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Existing Issues": {
      "main": [
        [
          {
            "node": "Collect Descriptions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Descriptions": {
      "main": [
        [
          {
            "node": "Get Hashes Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Ticket Using ChatGPT",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Ticket Using ChatGPT": {
      "main": [
        [
          {
            "node": "Create Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}