See llms.txt for all machine-readable content.

Back to Templates

Run an English website chatbot with OpenAI GPT-5 and Qdrant

Quick overview

Build an AI chatbot that answers questions using your website's own knowledge base.

This workflow combines intent classification, safety routing, vector search with Qdrant, OpenAI embeddings, Cohere reranking, grounded AI responses, and structured JSON output through a webhook.

How it works

  1. Receives chatbot requests through an authenticated webhook and normalizes the incoming payload.
  2. Uses OpenAI to classify each request as smalltalk, knowledge search, or rejected/out-of-scope.
  3. Routes each request to a dedicated processing path.
  4. Handles smalltalk separately without unnecessarily querying the vector database.
  5. For website-related questions, searches the Qdrant knowledge base using OpenAI embeddings.
  6. Reranks retrieved documents with Cohere and builds a deduplicated context from the most relevant sources.
  7. Uses an AI Agent to generate an answer grounded only in the retrieved website content.
  8. Parses and cleans the result into a consistent JSON response ready for your website or frontend.

Setup

  1. Import the workflow into n8n.
  2. Configure the webhook authentication.
  3. Add your OpenAI API credentials.
  4. Connect your Qdrant instance and select your website knowledge collection.
  5. Add your Cohere API credentials for reranking.
  6. Review and customize the AI models, prompts, and output schema.
  7. Connect your website or chat frontend to the production webhook URL.
  8. Activate the workflow.

Requirements

  • n8n
  • OpenAI API credentials
  • Qdrant instance
  • Website content already indexed in a Qdrant collection
  • Cohere API credentials for reranking
  • A website or frontend capable of sending requests to the webhook
  • Note: This template handles the chatbot query and response pipeline. Your website content must already be indexed in Qdrant. Website crawling, content ingestion, chunking, and synchronization are not included in this workflow.

Customization

  • Customize the intent rules, chatbot personality, safety behavior, AI models, Qdrant collection, retrieval depth, Cohere reranking, prompts, context generation, output schema, and final webhook response to fit your website or application.

Additional info

Customize the intent rules, chatbot personality, safety behavior, AI models, Qdrant collection, retrieval depth, Cohere reranking, prompts, context generation, output schema, and final webhook response to fit your website or application.