Intelligent ITSM Ticket Classification and Resolution using Gemini and Qdrant - n8n Workflow

Use this powerful n8n workflow to automatically classify incoming ITSM tickets using Gemini AI, leverage a Qdrant RAG knowledge base for instant answers, and create incidents in ServiceNow.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

IT Service Management (ITSM) Professionals looking to automate Level 1 support.
System Administrators needing smart ticket routing and auto-resolution.
Developers building complex RAG pipelines using n8n and LangChain integration.
Users seeking advanced n8n templates for AI-driven business processes.

Overview

Handling a large volume of support queries manually is inefficient. This sophisticated n8n workflow solves this by providing instant AI classification and resolution for inbound chat messages. It functions as a complete AI service agent, routing requests intelligently. The core value of this n8n automation is its ability to categorize user input (Incident, Request, or Other) using a specialized Text Classifier n8n node powered by Google Gemini. For general queries, it utilizes a Retrieval-Augmented Generation (RAG) system, searching a knowledge base stored in the Qdrant vector database via a dedicated n8n node. If the query is classified as an 'Incident,' the n8n workflow automatically creates a record in ServiceNow, drastically reducing manual ticket creation time. This is a crucial n8n workflow for modern, efficient IT operations.

How it Works

This n8n workflow operates in two main modes: Knowledge Ingestion (setup) and Operational (live ticket handling).


  1. Operational Flow (Ticket Handling): The process is initiated by the When chat message received n8n trigger, which captures the user's input (chatInput).

  2. AI Classification: The input is immediately passed to the Text Classifier n8n node, which uses the Google Gemini Chat Model1 to classify the request into one of the predefined categories (Incident, Request, Other). This classification decision is critical for routing the n8n workflow.

  3. ServiceNow Integration: If classified as an 'Incident', the workflow routes to the Create an incident ServiceNow n8n node, automatically generating a ticket with the user's message as the short description.

  4. RAG/AI Agent Handling: For general queries (or if the classification routes to the AI Agent), the AI Agent n8n node takes over. This agent is configured to use the Qdrant Vector Store as an external tool, performing a semantic search against the 'FAQBase' collection. It leverages the Google Gemini Chat Model and Simple Memory to provide context-aware answers directly from the knowledge base.

  5. Knowledge Ingestion Flow (Setup): A separate path, triggered manually via the When clicking ‘Execute workflow’ n8n trigger, uses the Edit Fields n8n node to define sample knowledge data (sample_kb). This data is then converted into vector embeddings using Embeddings Google Gemini and stored in the 'FAQBase' Qdrant collection via the Qdrant Vector Store1 n8n node. This ensures the RAG component has up-to-date information.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it directly into your n8n instance via the 'Workflows' screen using the 'New' button and selecting 'Import from JSON'.

  2. ServiceNow Credentials: Set up a ServiceNow Basic Auth credential for the Create an incident n8n node. This requires your ServiceNow URL, username, and password.

  3. Google Gemini Credentials: You need a Google Gemini(PaLM) API credential for the various AI nodes (Google Gemini Chat Model, Text Classifier, Embeddings Google Gemini). This credential powers the LLM classification and embedding generation required by the n8n workflow.

  4. Qdrant Credentials: Configure a Qdrant API credential for both the retrieval and insertion Qdrant Vector Store n8n nodes. Ensure your Qdrant instance is accessible.

  5. Knowledge Base Setup: Execute the workflow starting from the When clicking ‘Execute workflow’ n8n trigger (the manual ingestion path) once to populate the 'FAQBase' collection in Qdrant with the sample knowledge data. This prepares the RAG environment for the AI Agent n8n node.

  6. Activate: Ensure the When chat message received n8n trigger is correctly configured (especially the webhook URL if exposed publicly) and set the workflow to 'Active'.

Node Details

When chat message received (n8n trigger): The starting point of the operational n8n workflow. It uses a LangChain Chat Trigger webhook to listen for incoming user queries, providing the chatInput data.
Text Classifier (n8n node): Utilizes Google Gemini to categorize the incoming chatInput into 'Incident', 'Request', or 'Other'. It ensures subsequent n8n nodes receive clean classification data for routing.
Google Gemini Chat Model1 (n8n node): The large language model backbone for the Text Classifier, ensuring accurate semantic classification within this critical n8n workflow step.
Create an incident (ServiceNow n8n node): Executes the creation of a new incident ticket in ServiceNow upon receiving a request classified as an 'Incident'. It dynamically pulls the short description from the original user input.
AI Agent (n8n node): The core intelligence. This node orchestrates the query, utilizing the connected Google Gemini Chat Model for reasoning and the Qdrant Vector Store as a search tool to provide context-aware responses.
Qdrant Vector Store (Retrieve as Tool) (n8n node): Used by the AI Agent to perform a Retrieval-Augmented Generation (RAG) lookup. It searches the 'FAQBase' collection for relevant knowledge snippets based on the user's semantic query.


  • Qdrant Vector Store1 (Insert Mode) (n8n node): Part of the ingestion pipeline, this n8n node is responsible for taking processed documents (with embeddings) and writing them into the 'FAQBase' collection, maintaining the knowledge base's integrity.

Related n8n Workflows

Free

Nodes: 14 Nodes
Updated: December 26 2025
View all
Created by
Nikitha
Nikitha

Featured*