AutomationFlowsAI & RAG › Automate Itsm Ticket Classification and Resolution Using Gemini, Qdrant and…

Automate Itsm Ticket Classification and Resolution Using Gemini, Qdrant and…

Original n8n title: Automate Itsm Ticket Classification and Resolution Using Gemini, Qdrant and Servicenow

ByNikitha @nikitha-didikadi on n8n.io

This template is ideal for IT support teams, internal helpdesk automation engineers, and developers building intelligent ticketing systems. It helps streamline ITSM workflows by automatically classifying user queries, retrieving relevant knowledge base entries, and triggering…

Chat trigger trigger★★★★☆ complexityAI-powered24 nodesAgentGoogle Gemini ChatMemory Buffer WindowChat TriggerText ClassifierService NowQdrant Vector StoreGoogle Gemini Embeddings
AI & RAG Trigger: Chat trigger Nodes: 24 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #10241 — we link there as the canonical source.

This workflow follows the Agent → Chainsummarization recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "2Qu0E8lUeCSRtola",
  "name": "ITSM1",
  "tags": [],
  "nodes": [
    {
      "id": "850abce9-599a-413c-a436-60a008c0b5c9",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -128,
        528
      ],
      "parameters": {
        "text": "=You are agent search {{ $json.chatInput }} query in the  in the Knowledge base \"FAQBase\" and give the response from that Qdrant Base  other wise tell no answer found. ",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "ba465b14-47c5-4f6a-9f75-8c55bae9fdac",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -320,
        832
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9b779910-299b-4400-9146-f7b6201b1b6f",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -128,
        816
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "43ca808f-9c37-423d-8c4d-92abee33e3ea",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -800,
        320
      ],
      "parameters": {
        "mode": "webhook",
        "public": true,
        "options": {
          "responseMode": "lastNode"
        }
      },
      "typeVersion": 1.3,
      "alwaysOutputData": false
    },
    {
      "id": "89e2f425-c478-4c07-9921-7f70b5e9c952",
      "name": "Text Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -528,
        304
      ],
      "parameters": {
        "options": {
          "enableAutoFixing": true,
          "systemPromptTemplate": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json."
        },
        "inputText": "={{ $json.chatInput }}",
        "categories": {
          "categories": [
            {
              "category": "Incident ",
              "description": "Something is broken or not working (e.g., system down, hardware failure) "
            },
            {
              "category": "Request",
              "description": " Asking for something new installation (e.g., software installation, access request)."
            },
            {
              "category": "Other",
              "description": " Anything that doesn't fit the above (e.g., general queries, spam)."
            }
          ]
        }
      },
      "typeVersion": 1.1,
      "alwaysOutputData": true
    },
    {
      "id": "fcf2c082-6764-4ef4-aecc-f6bc90c154c0",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -608,
        576
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "002f60a9-f241-45a8-8be5-f02ed7db3475",
      "name": "Create an incident",
      "type": "n8n-nodes-base.serviceNow",
      "position": [
        0,
        0
      ],
      "parameters": {
        "resource": "incident",
        "operation": "create",
        "authentication": "basicAuth",
        "additionalFields": {},
        "short_description": "={{ $('When chat message received').item.json.chatInput }}"
      },
      "credentials": {
        "serviceNowBasicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d8d72820-7352-4db7-bde0-7f34829dd0a2",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        272,
        176
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c62d043f-e4fd-4bd9-b3bc-352cfe187e0b",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        48,
        832
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {},
        "toolDescription": "=Use this tool to get the actual information{{ $json.chatInput }} from the Qdrant  Collection",
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "FAQBase",
          "cachedResultName": "FAQBase"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "f503164a-6a5e-4f8e-ab13-b2d9291cdbc0",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "807e969e-a61f-491b-a476-523eadf250b2",
              "name": "sample_kb",
              "type": "string",
              "value": "Question: How to raise a ticket in an ITSM tool?\nAnswer: Go to the ITSM portal \u2192 Click on \"Create New Ticket\" \u2192 Fill in the required details (issue type, description, priority) \u2192 Submit the ticket.\n\nQuestion: How to check the status of a ticket?\nAnswer: Log in to the ITSM tool \u2192 Go to \"My Tickets\" or \"Ticket History\" \u2192 Check the current status (Open, In  Progress, Resolved, Closed).\n\nQuestion: How to install software using ITSM?\nAnswer: Raise a \"Service Request\" ticket \u2192 Select \"Software Installation\" \u2192 Mention the software name and version \u2192 Submit \u2192 Wait for approval and installation by IT team.\n\nQuestion: How to reset your password?\nAnswer: Go to the ITSM portal \u2192 Click on \"Password Reset\" under Service Requests \u2192 Fill in your user ID \u2192 Submit \u2192 Follow the instructions sent via email."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "081de542-a82b-4644-a6f3-354a308d6994",
      "name": "Qdrant Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1008,
        672
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "FAQBase",
          "cachedResultName": "FAQBase"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "8e968996-0d89-484e-8566-0091c67ab3c0",
      "name": "Embeddings Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        928,
        896
      ],
      "parameters": {},
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "68801987-ab93-48da-892f-abec5ed16fc4",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        624,
        688
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d61ab112-60d9-4fb2-a6c2-19ce0b54a84a",
      "name": "Embeddings Google Gemini1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        96,
        1056
      ],
      "parameters": {},
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6d54ec99-6148-491f-8c78-c6f8b797c135",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1200,
        944
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "fda35534-f519-4ef1-b320-191c0879d3bc",
      "name": "Summarization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        272,
        16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "4ce5cc1b-eafe-4fa8-8b0d-449bdc16ceed",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        320
      ],
      "parameters": {
        "url": "python.com",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "03943db4-18b1-4fd8-915e-49b8b77d1d66",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        864
      ],
      "parameters": {
        "content": "Node Name: Qdrant Vector Store\nType: @n8n/n8n-nodes-langchain.vectorStoreQdrant\nPurpose: Retrieves relevant information from a vector database (Qdrant) based on semantic similarity to the user's input.\nKey Parameters:\nMode: retrieve-as-tool\nTool Description:\n=Use this tool to get the actual information{{ $json.chatInput }} from the Qdrant Collection\nCollection: FAQBase\nCredential Used: QdrantApi account\n\n Use Case:\nThis node is used to fetch contextually relevant answers from a pre-embedded FAQ knowledge base stored in Qdrant. It enhances the workflow by providing accurate, vector-based retrieval for user queries."
      },
      "typeVersion": 1
    },
    {
      "id": "466ca2f3-9c5f-43d2-994c-fccf2279b67a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        640
      ],
      "parameters": {
        "content": "Node Name: Qdrant Vector Store1\nType: @n8n/n8n-nodes-langchain.vectorStoreQdrant\nPurpose: Retrieves semantically similar information from the Qdrant vector database using embeddings.\nKey Parameters:\nMode: Default (not explicitly set, assumed retrieval)\nCollection: Uses the same Qdrant collection as other vector store nodes\nCredential Used: QdrantApi account\n Use Case:\nUsed to fetch relevant knowledge base entries or FAQs based on user input, leveraging vector similarity for intelligent matching."
      },
      "typeVersion": 1
    },
    {
      "id": "78002e8e-2210-4856-a7d9-c35bf884c0f8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        160
      ],
      "parameters": {
        "content": "Node Name: Google Gemini Chat Model2\nType: @n8n/n8n-nodes-langchain.lmChatGoogleGemini\nPurpose: Generates enriched responses or follow-up actions after classification or retrieval.\n Key Parameters:\nModel: Gemini (PaLM)\nCredential Used: Google Gemini(PaLM) Api account\nPosition in Workflow: Typically used after classification or after Qdrant retrieval\n Use Case:\nThis node helps generate intelligent responses based on the classified input or retrieved FAQ data, enhancing the user experience with contextual replies."
      },
      "typeVersion": 1
    },
    {
      "id": "736beef6-f3d1-4afa-9134-8c22b07381f1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -208
      ],
      "parameters": {
        "content": "Node Name: Create an incident\nType: n8n-nodes-base.serviceNow\nPurpose: Automatically creates a new incident in ServiceNow when the classified category is Incident.\n Key Parameters:\nAuthentication: Basic Auth\nResource: incident\nOperation: create\nShort Description: Create Incident based on the input from the user\nUse Case:\nTriggered when the Text Classifier identifies the input as an Incident, this node logs the issue directly into ServiceNow for ITSM tracking and resolution."
      },
      "typeVersion": 1
    },
    {
      "id": "e23ea4c6-36c5-4eb3-a070-cd66a42fa72c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        576
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "73f86ac8-7297-4480-acdd-cda13629c85f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        96
      ],
      "parameters": {
        "width": 256,
        "content": "Node Name: Text Classifier\nPurpose: Automatically classifies incoming user chat input into one of three predefined categories to route the workflow accordingly.\n Categories Defined:\nIncident\nDescription: Something is broken or not working (e.g., system down, hardware failure)\nRequest\nDescription: Asking for something new (e.g., software installation, access request)\nOther\nDescription: Anything that doesn't fit the above (e.g., general queries, spam)\n\nKey Parameters:\nInput Text:\n User will ask his query in the input\nOutput:\nReturns a clean JSON object with the classified category, which can be used to trigger conditional logic or route to ServiceNow, Gemini, or Qdrant nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "963a1038-3cc7-4c89-a00c-8d310a51d378",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        512
      ],
      "parameters": {
        "content": "Node Name: AI Agent\nType: @n8n/n8n-nodes-langchain.lmChatGoogleGemini\nPurpose: Acts as a conversational agent powered by Google Gemini (PaLM), capable of understanding user input, generating intelligent responses, and interacting with other workflow components.\nCore Capabilities:\nUses Gemini LLM to interpret natural language queries.\nCan respond, route, or trigger actions based on user intent.\nIntegrates with classification, retrieval (Qdrant), and incident/request handling nodes.\n Key Parameters:\nModel: Gemini (PaLM)\nCredential Used: Google Gemini(PaLM) Api account\nInput: Typically receives chatInput or processed text from classifier or retrieval nodes.\n Use Case:\nThis node serves as the central intelligence of your workflow, enabling dynamic decision-making and contextual automation. It can:\nAnswer FAQs using retrieved data\nTrigger ServiceNow incidents or requests\nProvide enriched responses using LLM capabilities"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "27e4bb28-93dd-4fea-9053-e1482a89c58b",
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "Create an incident",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an incident": {
      "main": [
        [
          {
            "node": "Summarization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This template is ideal for IT support teams, internal helpdesk automation engineers, and developers building intelligent ticketing systems. It helps streamline ITSM workflows by automatically classifying user queries, retrieving relevant knowledge base entries, and triggering…

Source: https://n8n.io/workflows/10241/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow acts as a 24/7 sales agent, engaging leads across WhatsApp, Instagram, Facebook, Telegram, and your website. It intelligently transcribes audio messages, answers questions using a knowle

Chat Trigger, Memory Postgres Chat, Tool Workflow +20
AI & RAG

⚡AI-Powered YouTube Playlist & Video Summarization and Analysis v2. Uses lmChatGoogleGemini, agent, splitOut, chainLlm. Chat trigger; 72 nodes.

Google Gemini Chat, Agent, Chain Llm +11
AI & RAG

This n8n workflow transforms entire YouTube playlists or single videos into interactive knowledge bases you can chat with. Ask questions and get summaries without needing to watch hours of content. 🔗

Google Gemini Chat, Agent, Chain Llm +11
AI & RAG

Unlock adaptive, context-aware AI chat in your automations—no coding required!

Agent, Chat Trigger, Google Gemini Chat +4
AI & RAG

Description This workflow automatically classifies user queries and retrieves the most relevant information based on the query type. 🌟 It uses adaptive strategies like; Factual, Analytical, Opinion, a

Agent, Chat Trigger, Google Gemini Chat +4