{
  "name": "IT ops AI SlackBot workflow - chat with your knowledge base",
  "nodes": [
    {
      "id": "96ef3bfe-a493-4377-b090-6b2d02d87480",
      "name": "Verify Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1420,
        800
      ]
    },
    {
      "id": "38db6da6-13bf-47a1-b5cb-f06403b309ac",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2120,
        1220
      ]
    },
    {
      "id": "139b606d-29ae-480d-bde7-458ef45dba01",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1840,
        700
      ]
    },
    {
      "id": "64acd4c6-cd53-46e5-a29e-40884044b186",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2800,
        1220
      ]
    },
    {
      "id": "e605864f-198e-4358-8333-50ed962d4e50",
      "name": "Check if Bot",
      "type": "n8n-nodes-base.if",
      "position": [
        1640,
        800
      ]
    },
    {
      "id": "8479c41e-b251-4f32-8daa-421969c4c8b3",
      "name": "Send Initial Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        2140,
        820
      ]
    },
    {
      "id": "dcd325b1-1ee8-4133-9a6e-8b37bf20d056",
      "name": "Delete Initial Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        2960,
        760
      ]
    },
    {
      "id": "8d3ac15c-b0bc-459c-9523-685b7f498efb",
      "name": "Send Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        3160,
        760
      ]
    },
    {
      "id": "02afa6b3-c528-4925-8b92-7b708b10e7ca",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        460
      ],
      "parameters": {
        "width": 414.5626477541374,
        "height": 516.5011820330969,
        "content": "![Imgur](https://i.imgur.com/iKyMV0N.png)\n## Webhook Trigger\nThe first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscri"
      }
    },
    {
      "id": "a8caa088-80dd-44a8-8c61-7a03a37de386",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        460
      ],
      "parameters": {
        "width": 403.49881796690335,
        "height": 517.6832151300242,
        "content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n## Check for Bot Responses\nIf the message received is from a Bot instead of a real user, it will ignore the message."
      }
    },
    {
      "id": "17b51014-4f9d-4650-963b-8d8d944869ea",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2900,
        460
      ],
      "parameters": {
        "width": 430.54373522458616,
        "height": 451.3947990543734,
        "content": "![Slack](https://i.imgur.com/iKyMV0N.png)\n## Delete Receipt and Send Response \nOnce the AI response is generated in response to the slack message, n8n delete's it's original *Message Received* message"
      }
    },
    {
      "id": "494a9ada-18e9-48a6-86a9-5e72cc797ddf",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2394.7517730496443,
        460
      ],
      "parameters": {
        "width": 488.1796690307332,
        "height": 723.5460992907797,
        "content": "![OpenAI](https://i.imgur.com/o89G0If.png)\n## Parse Response with AI Model \nThis workflow currently uses OpenAI to power it's responses, but you can open the AI Agent node below and set your own AI LL"
      }
    },
    {
      "id": "31bc923f-c981-45fd-827d-cede2ec3f3c3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2020,
        460
      ],
      "parameters": {
        "width": 356.5484633569741,
        "height": 516.5011820330968,
        "content": "![Slack](https://i.imgur.com/iKyMV0N.png)\n## Response Received\nOnce N8n sees that the messaged received is from a user, it will respond right away to acknowledge a message was received. You can edit t"
      }
    },
    {
      "id": "e81d6b07-9ac0-4848-ab7f-57a588103ce5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2980,
        1200
      ],
      "parameters": {
        "width": 951.1571908442271,
        "height": 467.66775526888296,
        "content": "![n8n](https://i.imgur.com/FWJX4km.png)\n## Build n8n workflow to query Knowledge Base\nBuilding your own tools for an AI Agent to use is simple and straightforward, but requires that you build a second"
      }
    },
    {
      "id": "890aeb96-1721-4cb4-a609-5409b30d5f6c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        1200
      ],
      "parameters": {
        "width": 644.582152697438,
        "height": 318.6662788502134,
        "content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n\n## Remembers the last 5 messages that a user sent\nBecause we are passing the channel ID of the user to the memory module, n8n is storing the last 5 slack messa"
      }
    },
    {
      "id": "1fa61c12-70d1-4d7e-8564-a2a574804243",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1660,
        1200
      ],
      "parameters": {
        "width": 644.582152697438,
        "height": 318.6662788502134,
        "content": "![OpenAI](https://i.imgur.com/o89G0If.png)\n\n## Change the AI Agents LLM\nTo change the model used, simply delete the ChatGPT model and replace with a different supported model by hitting the plus sign "
      }
    },
    {
      "id": "fecd81da-4723-4886-8d6f-9729623028a9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        460
      ],
      "parameters": {
        "width": 675.1724774900403,
        "height": 994.2389415638766,
        "content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n# Streamline IT Inquiries with n8n & AI!\n\n## Introducing the IT Ops AI SlackBot Workflow---a sophisticated solution designed to automate and optimize the manage"
      }
    },
    {
      "id": "16b79887-8218-4056-8add-39ebee6166bd",
      "name": "Receive DMs",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1200,
        800
      ]
    },
    {
      "id": "201b5399-6fff-48ca-81f0-a5cfc02c46d5",
      "name": "Call Confluence Workflow Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        3380,
        1280
      ]
    },
    {
      "id": "41026e03-5844-4e57-86bf-fc7e586265a4",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2500,
        820
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Delete Initial Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive DMs": {
      "main": [
        [
          {
            "node": "Verify Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Bot": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Initial Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Webhook": {
      "main": [
        [
          {
            "node": "Check if Bot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Initial Message": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Delete Initial Message": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Confluence Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}