Back to templates
AI & Support

Slack AI Support Bot

AI-powered Slack bot that answers questions using your company's knowledge base with RAG and Pinecone.

Slack
RAG
Pinecone
OpenAI
Support
Knowledge Base

About this template

Build an intelligent Slack support bot that can answer employee questions using your company's documentation and knowledge base. This workflow uses RAG (Retrieval-Augmented Generation) with Pinecone vector database for semantic search, ensuring accurate and contextual responses. Perfect for IT support, HR queries, or customer success teams looking to automate repetitive questions.

Workflow JSON

{
  "name": "Slack AI Support Bot",
  "nodes": [
    {
      "parameters": {
        "content": "## Template by Harshith Vaddiparthy\n\n\n**Learn to Build AI Automations**\nMaster n8n, AI agents, and no-code automation in my comprehensive course.\n→ harshith.com/vibecode\n\n\n**Content Automation Consulting**\nI help businesses automate video creation, social media, blogs, and newsletters.\n→ harshith.com/meet\n\n\n**Connect with me**\n→ linkedin.com/in/harshith-vaddiparthy",
        "height": 420,
        "width": 400,
        "color": 4
      },
      "id": "promo-sticky",
      "name": "Sticky Note - Credits",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -200
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "mention-check",
              "leftValue": "={{ $json.event.text }}",
              "rightValue": "<@YOUR_BOT_ID>",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "check-mention",
      "name": "Check Bot Mention",
      "type": "n8n-nodes-base.if",
      "position": [
        200,
        100
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "url": "https://slack.com/api/chat.postMessage",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"channel\": \"{{ $('Slack Trigger').item.json.event.channel }}\", \"text\": \"{{ $json.output }}\", \"thread_ts\": \"{{ $('Slack Trigger').item.json.event.ts }}\"}"
      },
      "id": "post-response",
      "name": "Post Response to Slack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        100
      ],
      "credentials": {
        "oAuth2Api": {
          "id": "YOUR_SLACK_OAUTH_CREDENTIAL_ID",
          "name": "Slack OAuth2"
        }
      },
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful support assistant for the company. Answer questions based on the context provided from the knowledge base. If you don't know the answer, say so politely and suggest they contact the support team directly.\n\nBe concise, friendly, and professional. Format responses for Slack (use *bold* for emphasis, bullet points where appropriate)."
        }
      },
      "id": "ai-agent",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        600,
        100
      ],
      "typeVersion": 1.7
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list"
        }
      },
      "id": "openai-model",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        600,
        320
      ],
      "credentials": {
        "openAiApi": {
          "id": "YOUR_OPENAI_CREDENTIAL_ID",
          "name": "OpenAI"
        }
      },
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "pineconeIndex": {
          "__rl": true,
          "value": "YOUR_PINECONE_INDEX",
          "mode": "list"
        },
        "topK": 5
      },
      "id": "pinecone-retriever",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        800,
        320
      ],
      "credentials": {
        "pineconeApi": {
          "id": "YOUR_PINECONE_CREDENTIAL_ID",
          "name": "Pinecone"
        }
      },
      "typeVersion": 1
    },
    {
      "parameters": {
        "events": [
          "message"
        ]
      },
      "id": "slack-trigger",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        0,
        100
      ],
      "webhookId": "slack-support-webhook",
      "credentials": {
        "slackOAuth2Api": {
          "id": "YOUR_SLACK_CREDENTIAL_ID",
          "name": "Slack"
        }
      },
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## Slack AI Support Bot\n\n### Setup:\n1. Create a Slack app with bot permissions\n2. Set up Pinecone and index your knowledge base\n3. Configure OpenAI credentials\n4. Update YOUR_BOT_ID in the If node\n\n### Flow:\n1. Listen for Slack messages mentioning the bot\n2. Query Pinecone for relevant context\n3. Generate AI response with context\n4. Reply in thread",
        "height": 300,
        "width": 400,
        "color": 7
      },
      "id": "info-sticky",
      "name": "Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        40
      ],
      "typeVersion": 1
    }
  ],
  "connections": {
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "Check Bot Mention",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Bot Mention": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Post Response to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "AI Agent",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "instanceId": "template-slack-support"
  }
}

Copy this JSON and import it into n8n via Settings → Import from File/URL → Paste JSON

Free n8n Automation Templates | Production-Ready Workflows | Harshith Vaddiparthy