Automate Slack AI Chatbot with RAG Using n8n for Company Knowledge

This workflow integrates Slack and n8n with an AI chatbot powered by RAG to instantly answer employee queries from internal documents, saving time and boosting staff productivity. It streamlines internal knowledge retrieval directly within Slack channels.
agent
vectorStoreQdrant
slackTrigger
+10
Workflow Identifier: 1332
NODES in Use: agent, memoryBufferWindow, embeddingsOpenAi, vectorStoreQdrant, toolCalculator, slackTrigger, slack, manualTrigger, httpRequest, googleDrive, documentDefaultDataLoader, textSplitterTokenSplitter, lmChatAnthropic
Automate Slack chatbot with n8n and RAG

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow is a Slack AI chatbot. It answers employee questions quickly. It stops long manual searches. It uses company documents and AI to give correct replies inside Slack.

The workflow takes messages that mention the bot in Slack. It looks for information in Google Drive files. Then it uses AI models to create short answers with links to documents. It also remembers recent chat history. This helps staff get support anytime without waiting.


Inputs, Processing and Output

Inputs

  • Slack messages: Employee questions mentioning the AI bot.
  • Google Drive documents: Company policy files and other text documents.
  • API keys: OpenAI, Anthropic, Qdrant credentials for AI and vector search.

Processing Steps

  1. Create or refresh the Qdrant vector collection to store document data.
  2. Download and convert Google Drive files to plain text.
  3. Split text into small chunks for AI processing.
  4. Generate vector embeddings of these chunks with OpenAI.
  5. Store embeddings in Qdrant for fast similarity search.
  6. Listen for Slack mentions with the Slack Trigger node.
  7. Pass user questions to the AI Agent node with a prompt to find info in Qdrant.
  8. Use Simple Memory to keep conversation context by channel and user.
  9. Run Anthropic language model as backup for answer quality.
  10. Send AI answers back as Slack replies using the Send message node.

Output

Quick and accurate Slack message replies with cited company knowledge.


Why This Workflow Exists

Many companies waste hours answering employee questions. People search many documents and emails. This wastes time and causes delays. Wrong info spreads and frustrates staff.

This automation solves that by giving fast, trustworthy answers inside Slack. It uses AI with real company info. It works anytime without needing a human to respond.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor.
  3. Click the menu and select “Import from File.”
  4. Choose the downloaded file and import it.

Step 2: Configure Credentials and Settings

  1. Add your Slack API Key in the Slack Trigger and Send message nodes.
  2. Add your Google Drive OAuth2 credentials for file access.
  3. Add your Qdrant API URL and API Key in HTTP Request nodes for collection management.
  4. Enter your OpenAI API key in the Embeddings OpenAI2 node.
  5. Add your Anthropic API key in the Anthropic Chat Model node.
  6. Update Slack channel IDs and Google Drive folder IDs in relevant nodes to match your workspace.

Step 3: Test the Workflow

  1. Run the HTTP Request nodes Create collection and Refresh collection manually to prepare Qdrant.
  2. Run the workflow once to download and index your Google Drive documents.
  3. Send a test mention to the AI bot in Slack.
  4. Check the workflow executions and Slack reply for correct answers.

Step 4: Activate for Production

  1. Toggle the workflow active switch to enable listening for Slack messages continuously.
  2. Keep monitoring executions for errors.
  3. Update document indexing when company files change.

If using self-host n8n or running n8n on server, consider self-host n8n for control and privacy.


Customization Suggestions

  • Change Slack channel IDs in Slack Trigger and Send message nodes to control where the bot listens and replies.
  • Adjust Simple Memory node settings to keep more or fewer past messages for chat context.
  • Update Qdrant collection names and endpoints in HTTP Request nodes for linking to your own vector database.
  • Replace OpenAI embeddings with other providers by changing embedding node and credentials.
  • Add more Slack scopes if you want the bot to do advanced actions like uploading files or adding reactions.

Common Problems and Fixes

Slack messages do not trigger workflow

This happens if the Slack bot lacks required permissions or isn’t in the channel.

Make sure the bot has scopes like app_mentions:read and chat:write. Reinstall the app and invite it to the Slack channel.

No documents found in AI answers

This happens if Qdrant collection is empty or not set up.

Run the Create collection and Refresh collection nodes manually, then rerun document indexing.

OpenAI API is slow or errors

Check OpenAI usage limits or network connectivity.

Increase API quotas or retry later.


Pre-Production Checklist

  • Check Slack bot token has all needed scopes and is active in targeted channels.
  • Manually run HTTP Request nodes to create and clear Qdrant collection before indexing documents.
  • Confirm Google Drive credentials work and files download correctly.
  • Test sending Slack mentions and verify AI answers are correct.
  • Backup Qdrant data and n8n workflow before going live.

Deployment Notes

Activate the workflow in n8n to run 24/7. Watch for errors inside the dashboard.

Regularly update Google Drive indexing after document changes. Adjust bot permissions if needed.

For more privacy and control, consider self-host n8n.


Summary

✓ Workflow answers employee questions fast inside Slack.
✓ Uses Google Drive documents and AI embeddings to find info.
✓ Saves time and reduces errors from manual searching.
✓ Keeps conversation context for ongoing chats.
✓ Provides 24/7 help without humans answering.
✓ Easy to import, configure, test, and activate in n8n.


Automate Slack chatbot with n8n and RAG

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Other vector databases can replace Qdrant, but the HTTP Request nodes and vector store nodes must be updated to match the new database API.
To lower OpenAI cost, reduce text chunk size, limit usage, and cache answers where possible to avoid repeated queries.
Documents stay in Google Drive and Qdrant with secure API access. Slack messages stay in workspace channels only.
Yes, n8n scales well and using vector search limits AI load by focusing on relevant document chunks.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.