ServiceNow + OpenAI: instant KB answers in chat
Your ServiceNow knowledge base is full of answers. People still ask the same questions in chat, DMs, and tickets because searching feels slow, confusing, or pointless.
This is what burns IT support leads first, but operations managers and internal enablement teams get dragged in too. With this ServiceNow OpenAI chat automation, you turn existing KB articles into fast, consistent chat replies, which means fewer repeat pings and cleaner ticket queues.
Below, you’ll see how the workflow indexes your ServiceNow KB into a searchable vector database, then uses OpenAI to answer chat questions using that content.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: ServiceNow + OpenAI: instant KB answers in chat
flowchart LR
subgraph sg0["When chat message received Flow"]
direction LR
n3@{ icon: "mdi:play-circle", form: "rounded", label: "When chat message received", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "AI Agent", pos: "b", h: 48 }
n5@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n6@{ icon: "mdi:cube-outline", form: "rounded", label: "Qdrant Vector Store1", pos: "b", h: 48 }
n8@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n9@{ icon: "mdi:vector-polygon", form: "rounded", label: "Embeddings OpenAI1", pos: "b", h: 48 }
n5 -.-> n4
n8 -.-> n4
n9 -.-> n6
n6 -.-> n4
n3 --> n4
end
subgraph sg1["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:cube-outline", form: "rounded", label: "Qdrant Vector Store", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "Default Data Loader", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Recursive Character Text Spl..", pos: "b", h: 48 }
n7@{ icon: "mdi:vector-polygon", form: "rounded", label: "Embeddings OpenAI", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/servicenow.svg' width='40' height='40' /></div><br/>Get many table records"]
n11@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n7 -.-> n0
n1 -.-> n0
n10 --> n0
n2 -.-> n1
n11 --> n10
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n3,n11 trigger
class n4,n1,n2 ai
class n8 aiModel
class n5 ai
class n6,n0 ai
class n9,n7 ai
classDef customIcon fill:none,stroke:none
class n10 customIcon
The Problem: Your KB Exists, But It’s Not “In the Moment”
ServiceNow knowledge articles are usually written with good intentions, then buried behind a search experience most employees don’t trust. So they do the easy thing: ask in chat. The result is a steady drip of interruptions that feels small in the moment, but it stacks up fast across a week. Support reps end up retyping the same “official” answer, managers get pulled into escalations that should never exist, and tiny inconsistencies creep in (“we changed that policy last month”). Honestly, it’s not a knowledge problem. It’s a delivery problem.
Here’s where it breaks down in real teams.
- People ask in chat because KB search takes too many clicks, especially on mobile or during an outage.
- Support answers drift over time, so employees stop believing the KB is the source of truth.
- New hires don’t know what to search for, so they ask broad questions and get broad, unhelpful replies.
- Every repeated question steals focus, and the backlog grows while your best people are stuck copy-pasting.
The Solution: ServiceNow KB Answers, Delivered Instantly in Chat
This n8n workflow turns your ServiceNow Knowledge Article table into a “chat-ready” brain, then uses OpenAI to respond to questions with the right context. It starts by fetching many KB records from ServiceNow, cleaning and structuring them for AI, and splitting long articles into smaller chunks that are easier to search. Next, OpenAI generates embeddings (a numeric representation of meaning) for each chunk, and the workflow stores them in Qdrant, a vector database designed for fast similarity search. On the chat side, when someone sends a message, the workflow embeds the question, retrieves the most relevant KB chunks from Qdrant, and hands that context to an OpenAI chat model through an AI Agent. The user gets a clear answer in the chat flow, without anyone hunting for links.
The workflow has two “lanes.” One lane ingests and indexes your ServiceNow KB on demand (manual start). The other lane answers incoming chat messages using retrieval from Qdrant plus OpenAI reasoning, with a small memory buffer to keep the conversation coherent.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your team gets 20 repeat questions a day in chat (“VPN not working,” “how do I reset MFA,” “where’s the policy”). A human answer is rarely just one message, so call it 5 minutes each on average, which is about 100 minutes daily. With this workflow, the “work” becomes: send the question (seconds), let retrieval + generation run (usually under a minute), then the user gets the reply. That’s roughly 1.5 hours back per day, without asking anyone to change tools or behavior.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- ServiceNow to access your Knowledge Article records.
- OpenAI API for embeddings and chat responses.
- Qdrant to store and search KB embeddings.
Skill level: Intermediate. You’ll connect accounts, add API keys, and understand which ServiceNow table/fields you’re indexing.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Manual indexing run. You click execute, and n8n fetches many records from the ServiceNow Knowledge Article table so you can build (or rebuild) the search index when you need it.
Content preparation for AI. The workflow loads each article into a consistent document format, then splits large articles into smaller segments so retrieval doesn’t miss the relevant paragraph buried halfway down.
Embeddings + storage. OpenAI turns each text segment into an embedding, and Qdrant stores those vectors along with metadata like article identifiers and titles for later lookup.
Chat question answering. When a message arrives, the workflow embeds the question, uses Qdrant to retrieve the closest KB chunks, and the AI Agent composes a reply using the OpenAI chat model plus a short conversation memory buffer.
You can easily modify which ServiceNow knowledge bases get indexed and how many chunks are retrieved for each answer based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
Set up the live chat entry point that kicks off the AI response flow.
- Add the Incoming Chat Trigger node to your workflow.
- Set Mode to
webhook. - Set Public to
trueand Authentication tobasicAuth. - Credential Required: Connect your
httpBasicAuthcredentials in Incoming Chat Trigger.
Step 2: Connect ServiceNow
Load knowledge base articles from ServiceNow to build the semantic index.
- Add the Manual Start Trigger node to manually run ingestion.
- Add the Fetch ServiceNow Records node and connect it to Manual Start Trigger.
- Set Resource to
tableRecordand Operation togetAll. - Set Return All to
trueand Table Name tokb_knowledge. - Set Authentication to
basicAuthand add sysparm_fields to includenumber,short_description, andtext. - Credential Required: Connect your
serviceNowBasicApicredentials in Fetch ServiceNow Records.
Step 3: Set Up the Knowledge Indexing Pipeline
Transform ServiceNow articles into embeddings and store them in Qdrant for retrieval.
- Add Recursive Text Segmenter and set Chunk Size to
500and Chunk Overlap to50. - Add Standard Data Loader and connect it so Recursive Text Segmenter feeds into it as the text splitter.
- Add OpenAI Embedding Generator to generate embeddings for the index.
- Add Qdrant Vector Index and set Mode to
insertand Qdrant Collection torag_collection. - Connect Fetch ServiceNow Records → Qdrant Vector Index so ingestion flows into storage.
- Credential Required: Connect your
openAiApicredentials in OpenAI Embedding Generator. - Credential Required: Connect your
qdrantApicredentials in Qdrant Vector Index.
Step 4: Configure Retrieval and AI Response
Wire the conversational agent to Qdrant retrieval and memory for grounded responses.
- Add Qdrant Retrieval Tool and set Mode to
retrieve-as-tool, Top K to10, Tool Name toretriever, and Tool Description toRetrieve data from a semantic database to answer questions. - Add OpenAI Embedding Builder and connect it as the embedding source for Qdrant Retrieval Tool.
- Add OpenAI Chat Engine and set Model to
gpt-4.1-mini. - Add Context Memory Buffer and connect it to Conversational AI Agent as the memory input.
- Add Conversational AI Agent and set its System Message to the full instruction block from the node so it always retrieves and cites articles.
- Connect Incoming Chat Trigger → Conversational AI Agent as shown in the execution flow.
- Credential Required: Connect your
qdrantApicredentials in Qdrant Retrieval Tool. - Credential Required: Connect your
openAiApicredentials in OpenAI Chat Engine and OpenAI Embedding Builder.
Step 5: Test and Activate Your Workflow
Validate ingestion and chat response before turning the workflow on.
- Click Execute Workflow on Manual Start Trigger to ingest ServiceNow articles into Qdrant Vector Index.
- Send a test request to the Incoming Chat Trigger webhook URL using the configured basic auth credentials.
- Confirm that Conversational AI Agent calls Qdrant Retrieval Tool and returns an answer grounded in the KB content with article references.
- When the test is successful, toggle the workflow Active to enable production use.
Common Gotchas
- ServiceNow credentials can expire or need specific permissions. If things break, check the ServiceNow user’s roles and the integration user’s API access first.
- If you’re indexing a lot of long articles, embedding and Qdrant writes can take time. If downstream nodes fail on empty results, increase any wait/retry behavior and watch for rate limits on the OpenAI side.
- Default prompts in AI nodes are generic. Add your support tone, escalation rules, and “when to link the KB vs. summarize it” early or you will be polishing answers forever.
Frequently Asked Questions
About 60–90 minutes if your ServiceNow and OpenAI access is ready.
No. You will mostly connect accounts and paste API keys. The “hard part” is deciding which KB content should be indexed.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage (often a few dollars a month for internal support volumes) plus Qdrant hosting if you don’t run it yourself.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to be intentional. Most teams filter which ServiceNow knowledge bases (or article states) get pulled in the “Fetch ServiceNow Records” node, then store metadata in Qdrant so retrieval can prefer the right source. You can also adjust the text splitting behavior in the “Recursive Text Segmenter” node if your articles are short, or if they contain big tables that don’t chunk cleanly. Finally, tune how many results Qdrant returns in the “Qdrant Retrieval Tool” so the chat model doesn’t get overwhelmed with context.
Usually it’s permissions or an expired credential on the ServiceNow integration user. Confirm the account can read the Knowledge Article table you’re querying, then re-authenticate in n8n and try a small fetch to validate. If it works in small batches but fails at scale, look for API limits or a query that’s pulling too many records at once.
A lot.
For RAG-style workflows, yes, most of the time. You’re doing embeddings, chunking, vector search, and an agent-style chat response, which is more than a simple “if X then Y” integration. n8n handles branching and data shaping without turning every extra step into a cost decision, and self-hosting is an option if volume grows. Zapier or Make can be fine for lightweight routing, but they’re not built around vector retrieval. If you’re on the fence, Talk to an automation expert and you’ll get a straight answer.
Once this is running, your ServiceNow KB stops being a dusty archive and starts acting like a real-time teammate. Set it up, keep your articles updated, and enjoy the quiet.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.