{
  "name": "SLACK BOT Demo",
  "nodes": [
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -48,
        224
      ],
      "id": "6405ffff-a970-4103-8439-f2648d554ec7",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "You are a helpful internal ai assistant on slack who uses google docs to answer the companies faqs from employees"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        48,
        -16
      ],
      "id": "32a8b1ee-a4b9-4fca-bebf-d21ca0ff90d7",
      "name": "Internal AI Slack Assistant"
    },
    {
      "parameters": {
        "trigger": [
          "app_mention"
        ],
        "channelId": {
          "__rl": true,
          "value": "C09H6M87YPJ",
          "mode": "list",
          "cachedResultName": "help-n8n"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.slackTrigger",
      "typeVersion": 1,
      "position": [
        -176,
        -16
      ],
      "id": "8409086b-5358-46a5-bfc7-ef81b59bbda8",
      "name": "Slack Trigger",
      "webhookId": "5cce3d01-b540-4db4-bfca-8e8eb3b9ef61",
      "credentials": {
        "slackApi": {
          "id": "BjT4isxbN4tHqbOM",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C09H6M87YPJ",
          "mode": "list",
          "cachedResultName": "help-n8n"
        },
        "text": "={{ $json.output }}",
        "otherOptions": {
          "thread_ts": {
            "replyValues": {
              "thread_ts": "={{ $('Slack Trigger').item.json.ts }}"
            }
          }
        }
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        448,
        -16
      ],
      "id": "0bc5ee64-3666-4abe-8f6c-22f993d57700",
      "name": "Send a message",
      "webhookId": "8cad2ad2-c609-4d11-b53d-9e02919b9009",
      "credentials": {
        "slackApi": {
          "id": "KMkFQmc4r1CU08xl",
          "name": "Slack account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/19_fdwLow4JjyRzuWfxnxhOPX5LRYsgCYaLxOAbOe7Uw/edit?tab=t.0",
        "simple": false
      },
      "type": "n8n-nodes-base.googleDocsTool",
      "typeVersion": 2,
      "position": [
        224,
        224
      ],
      "id": "118a7a37-aab7-4a6c-8114-cfee9d81a95b",
      "name": "Get a document in Google Docs",
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "qziHwPuC4VDliHwf",
          "name": "Google Docs account"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{$json[\"team\"]}}:{{$json[\"channel\"]}}:thread_{{ $json[\"thread_ts\"] || $json[\"ts\"] }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        96,
        224
      ],
      "id": "fec27209-8452-4e0b-ac33-36d74823d988",
      "name": "Simple Memory"
    }
  ],
  "pinData": {},
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Internal AI Slack Assistant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Internal AI Slack Assistant": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "Internal AI Slack Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a document in Google Docs": {
      "ai_tool": [
        [
          {
            "node": "Internal AI Slack Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Internal AI Slack Assistant",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9ecca9ed-36e4-4e2a-b116-7c8e43ec16fc",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4aabc0aa2e160dafa4f9d9bcedde563b5af29598cd16960f637ae2fb99aea720"
  },
  "id": "9CtBoeuo1CBFH6A6",
  "tags": []
}