{
  "name": "Slack chatbot powered by AI",
  "nodes": [
    {
      "id": "12786b19-159f-45b0-8d15-d88de73c17e9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1540,
        660
      ],
      "parameters": {
        "width": 483,
        "height": 345,
        "content": "### Slack POSTs to Webhook on every message so we need to filter-out bot messages"
      }
    },
    {
      "id": "3949be41-98b7-4414-84fd-819f4fccca35",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        1080
      ],
      "parameters": {
        "width": 293,
        "height": 228,
        "content": "### Tools which Agent can use to accomplish the task\n"
      }
    },
    {
      "id": "76ce81d8-33e2-470a-9313-dd888acabed0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        1080
      ],
      "parameters": {
        "width": 288,
        "height": 233,
        "content": "### Conversation history is stored in memory using channel id as key"
      }
    },
    {
      "id": "3682ffd3-7002-466a-bedf-9897067586c0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        1080
      ],
      "parameters": {
        "width": 260,
        "height": 233,
        "content": "### The chat LM to process the prompt"
      }
    },
    {
      "id": "92865916-e814-49d4-baaa-4122c1447c23",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        640
      ],
      "parameters": {
        "width": 280,
        "height": 243,
        "content": "### Send agent's output as Slack message\n"
      }
    },
    {
      "id": "edeab2bb-8177-42c7-bcf4-f8d99e193729",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -820,
        740
      ]
    },
    {
      "id": "275f8192-6da6-41b0-b892-c779f5d136e4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -920,
        1180
      ]
    },
    {
      "id": "776ce632-5c62-4ac6-a494-e23ef650ac48",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -620,
        1180
      ]
    },
    {
      "id": "97989831-3fc6-4954-ac55-8e0950081b7a",
      "name": "Is user message?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1480,
        740
      ]
    },
    {
      "id": "afa6b192-1e25-46b6-8fdc-81dff9a37e74",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1280,
        820
      ]
    },
    {
      "id": "eab68a99-cdd6-4ea1-8d6f-053c2a96303c",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        -360,
        1180
      ]
    },
    {
      "id": "717117f5-5f34-4189-b92a-df2155e367ac",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        -220,
        1180
      ]
    },
    {
      "id": "1914f623-66c0-4547-bf3e-b4932d0c2a9b",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        -200,
        720
      ]
    },
    {
      "id": "4a7ec607-1706-4357-aa89-4c44faa98fb8",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1780,
        740
      ]
    }
  ],
  "connections": {
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Is user message?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Is user message?": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}