AutomationFlowsAI & RAG › Slack AI Chatbot : Context-aware, Replies to Mentions and Also Dms

Slack AI Chatbot : Context-aware, Replies to Mentions and Also Dms

ByTheo Marcadet @theomarcadet on n8n.io

Click here to access this Workflow for free.

Event trigger★★★★☆ complexityAI-powered19 nodesPinecone Vector StoreOpenAI EmbeddingsAgentTool ThinkSlackSlack ToolSlack TriggerOpenAI Chat
AI & RAG Trigger: Event Nodes: 19 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5845 — we link there as the canonical source.

This workflow follows the Agent → OpenAI Embeddings recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Slack AI ChatBot : Context-Aware, Replies to Mentions AND also DMs",
  "nodes": [
    {
      "id": "56138b72-10df-438f-8b9e-d82e1ebd87c2",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "disabled": true,
      "position": [
        3720,
        3080
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "3835abae-f509-4dd0-900a-9742c06ae820",
      "name": "Mapping data for the Agent",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        2620
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a0d16777-a89f-402c-b917-abb5da590b25",
      "name": "Either the bot should reply in dm or in public channel",
      "type": "n8n-nodes-base.if",
      "position": [
        3380,
        2620
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "161739af-625d-4c80-b142-24d81eb51064",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        2360
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "14fbf245-db4e-4812-986b-8f94293c3b15",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        2880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b76e4fc2-f503-4341-add4-51b9ac47781c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3560,
        2300
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "de201034-00f1-4add-be95-53cff68d0d8b",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "disabled": true,
      "position": [
        3660,
        3240
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "27d04c7c-0d05-4846-8e4f-533ef6ca0651",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3600,
        2980
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "468354ca-36a4-41b6-b0bd-c0d643088f21",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2960,
        2620
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "5c7ade77-c267-40a5-b04b-f1cdde87ed42",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        2280
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d14546a5-c5f1-495c-a7bf-2618f2841cea",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        2000
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ea3ceb64-862a-49e3-9b43-1b0a1902cee7",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3160,
        2860
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "849f22d8-8181-469e-9ffd-c555b33776bc",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        3040,
        3000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f5597b86-dffc-4280-8707-343ec3a7a116",
      "name": "Reply to public mention",
      "type": "n8n-nodes-base.slack",
      "position": [
        3680,
        2760
      ],
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "17b4e501-e5ee-4fb2-8a95-73b21b8b686f",
      "name": "Reply to DM",
      "type": "n8n-nodes-base.slack",
      "position": [
        3680,
        2480
      ],
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "cb98b088-6c08-4538-a0ba-6a2f27244be4",
      "name": "Get the history of a channel in Slack",
      "type": "n8n-nodes-base.slackTool",
      "position": [
        3260,
        3060
      ],
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "9dbfc53e-3cca-438c-92d1-4308559d7a87",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        2300,
        2620
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "68931226-a994-468d-8271-862f19b26e0d",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2720,
        2980
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a319ebb9-3523-47c6-b0af-7c04c00b1712",
      "name": "Simple Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2920,
        3000
      ],
      "parameters": {},
      "typeVersion": 1.3
    }
  ],
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Either the bot should reply in dm or in public channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "Mapping data for the Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mapping data for the Agent": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the history of a channel in Slack": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Either the bot should reply in dm or in public channel": {
      "main": [
        [
          {
            "node": "Reply to DM",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply to public mention",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Click here to access this Workflow for free.

Source: https://n8n.io/workflows/5845/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Your AI workforce is ready. Are you?

Google Sheets Tool, Mcp Trigger, Google Drive +29
AI & RAG

This is an ultimate AI assistant: Handle emails, schedule meetings, search the web, take notes, post to social media, and retrieve information from your knowledge base, all through simple Telegram com

Telegram Trigger, OpenAI, Agent +12
AI & RAG

MyAIAgentTeam:Email,Meeting,WebSearch,Notion,Tweet,RAG_PUBLIC. Uses telegramTrigger, openAi, agent, telegram. Event-driven trigger; 51 nodes.

Telegram Trigger, OpenAI, Agent +12
AI & RAG

Telegram dummy_client. Uses telegramTrigger, agent, lmChatOpenAi, telegram. Event-driven trigger; 48 nodes.

Telegram Trigger, Agent, OpenAI Chat +12
AI & RAG

This workflow builds a WhatsApp business assistant that uses OpenAI to classify incoming messages and route them to FAQ answers via Pinecone RAG, order placement and inventory updates in Google Sheets

WhatsApp Trigger, OpenAI, Agent +12