Build a ServiceNow Knowledge Chatbot with OpenAI and Qdrant RAG
- Data Ingestion Workflow (Left Panel – Pink Section)
This part collects data from the ServiceNow Knowledge Article table, processes it into embeddings, and stores it in Qdrant.
Steps:
Trigger: When clicking ‘Execute workflow’
The workflow starts manually when you click Execute workflow in n8n.
Get Many Table Records
Fetches multiple records from the ServiceNow Knowledge Article table. Each record typically contains knowledge article content that needs to be indexed.
Default Data Loader
Takes the fetched data and structures it into a format suitable for text splitting and embedding generation.
Recursive Character Text Splitter
Splits large text (e.g., long knowledge articles) into smaller, manageable chunks for embeddings. This step ensures that each text chunk can be properly processed by the embedding model.
Embeddings OpenAI
Uses OpenAI’s Embeddings API to convert each text chunk into a high-dimensional vector representation. These embeddings are essential for semantic search in the vector database.
Qdrant Vector Store
Stores the generated embeddings along with metadata (e.g., article ID, title) in the Qdrant vector database. This database will later be used for similarity searches during chatbot interactions.
- RAG Chatbot Workflow (Right Panel – Green Section)
This section powers the Retrieval-Augmented Generation (RAG) chatbot that retrieves relevant information from Qdrant and responds intelligently.
Steps:
Trigger: When chat message received
Starts when a user sends a chat message to the system.
AI Agent
Acts as the orchestrator, combining memory, tools, and LLM reasoning. Connects to the OpenAI Chat Model and Qdrant Vector Store.
OpenAI Chat Model
Processes user messages and generates responses, enriched with context retrieved from Qdrant.
Simple Memory
Stores conversational history or context to ensure continuity in multi-turn conversations.
Qdrant Vector Store1
Performs a similarity search on stored embeddings using the user’s query. Retrieves the most relevant knowledge article chunks for the chatbot.
Embeddings OpenAI
Converts user query into embeddings for vector search in Qdrant.
Related Templates
Convert JSON Objects to Base64 Strings with File Processing
Encode JSON to Base64 String in n8n This example workflow demonstrates how to convert a JSON object into a base64-encod...
AI Agent with Ollama for current weather and wiki
This workflow template demonstrates how to create an AI-powered agent that provides users with current weather informati...
Automate Daily YouTrack Task Summaries to Discord by Assignee
Daily YouTrack In-Progress Tasks Summary to Discord by Assignee Keep your team in sync with a daily summary of tasks cu...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments