HR Policy Retrieval using Slack, S3, and GPT-4.1-mini with RAG

Go to Workflow
0 views
Built by Humble Turtle Humble Turtle
Created on June 08, 2026

Description

HR Chatbot with RAG: Retrieve Company Policies via Slack, Amazon S3, and OpenAI
Overview
Answer HR and company policy questions via Slack, powered by a Knowledge Base of internal documents stored in S3. The assistant uses vector search and an OpenAI Chat Model to retrieve accurate answers.

The HR Assistant is an AI-powered Slack bot that allows employees to ask questions in natural language and get accurate answers from company documentation. Documents are managed through an ingestion workflow that retrieves files from S3, transforms them into embeddings, and stores them in a vector database.
On Slack, the assistant interprets questions, searches the Knowledge Base, and responds with concise and reliable answers, or clearly states when information isn’t available.

How it works
Normal interaction
An employee asks a question in Slack (e.g., “How many vacation days do I have?”).
The assistant checks the Knowledge Base (vector store).
If relevant information is found, the assistant provides a clear answer.
If not, it responds with: “That answer doesn’t appear to be covered in the materials I have access to.”

Standardized process of Knowledge Base ingestion
Trigger – The ingestion workflow is manually executed.
S3 Download – Files are pulled from the company’s S3 bucket.
Data Loader – Documents are pre-processed and split into chunks.
Embeddings – Each chunk is converted into an embedding via OpenAI.
Vector Store – Embeddings are stored in the Knowledge Base (vector DB).
Chatbot Workflow – When questions arrive via Slack, the assistant queries the vector store to find the most relevant context before generating a response.

Required Connections
To use the HR Assistant effectively, you need:
A Slack workspace, where the bot is installed and invited to relevant channels.
An S3 bucket containing company documents (e.g., HR policies, procedures).
Access to OpenAI API keys for both embeddings and chat models.
Proper permissions to fetch documents from S3 and write to the vector store.
A configured n8n instance with both ingestion and chatbot workflows.

Setup Time
≈ 20–30 minutes (depending on number of documents and Slack integration).

Customising this workflow
Add more document sources (e.g., Google Drive, Confluence) in the ingestion pipeline.
Expand the Slack integration to allow commands like /askHR or to restrict the bot to only respond when @mentioned.
Add scheduled ingestion (instead of manual trigger) to automatically refresh the Knowledge Base from S3.
Connect analytics nodes to monitor which HR topics employees ask most often.

Nodes Used (9)

AI Agent
@n8n/n8n-nodes-langchain.agent
AWS S3
n8n-nodes-base.awsS3
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory
Slack
n8n-nodes-base.slack
Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore