AI Agent in Slack with Retrieval-Augmented Generation
Workflow Description
Build an advanced AI agent within Slack that answers employee inquiries based on company documents. The system extracts data from Google Drive, processes it, and retrieves accurate answers from a vector database using RAG technology to ensure responses are grounded in actual company information.
How it works
- 1.Receive messages from Slack and activate the intelligent agent
- 2.Extract and process company documents from Google Drive, splitting them into indexable chunks
- 3.Convert queries and documents into vector representations and store them in Qdrant
- 4.Search the vector database to retrieve relevant documents and context
- 5.Process the query using Anthropic Claude with the retrieved context
- 6.Send the data-backed answer directly to Slack
Use cases
- Answer employee questions about company policies and procedures from official documents
- Extract specific information from multiple company files quickly without manual searching
- Support HR and admin teams with an intelligent document search tool
Requirements
- Active Slack workspace with bot permissions and app installation
- API keys for OpenAI (vector embeddings) and Anthropic (language processing)
- Google Drive account containing company documents (PDF, Word, or text files)
- Running Qdrant server or local instance for vector database storage
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (21)
AI Agent
Agent
Simple Memory
Memory Buffer Window
Embeddings OpenAI1
OpenAI
RAG
Vector Store Qdrant
Calculator
Tool Calculator
Get message
Slack Trigger
Send message
Slack
When clicking ‘Test workflow’
Manual Trigger
Create collection
HTTP Request
Refresh collection
HTTP Request
Get folder
Google Drive
Download Files
Google Drive
Default Data Loader
Document Default Data Loader
Token Splitter
Text Splitter Token Splitter
Sticky Note3
Sticky Note
Qdrant Vector Store1
Vector Store Qdrant
Sticky Note5
Sticky Note
Sticky Note2
Sticky Note
Embeddings OpenAI2
OpenAI
Sticky Note4
Sticky Note
Anthropic Chat Model
Lm Chat Anthropic