Copy contents of company's WiKi to Knowledge Base
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hello,
We have wiki with many pages with links and within which we have pages with links within which we have pages with links, how is the easy way to copy the content or pages of WiKi to Knowledge Articles in Knowledge Base.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Here are the few approaches:
1. Import XML / REST API (Most Scalable)
This is the cleanest approach for bulk migration. The general flow:
- Export your wiki content (most wikis support XML, HTML, or Markdown export).
- Transform the exported data into a format that maps to the
kb_knowledgetable fields —short_description,text(the article body),kb_knowledge_base(reference to your KB),kb_category, etc. - Use Import Sets (System Import Sets → Load Data) or the Table API (
/api/now/table/kb_knowledge) to insert records. - For internal cross-links between articles, you'd do a second pass after import to update
<a href>references to point to the newkb_view.do?sys_kb_id=...URLs.
2. Knowledge Management REST API with a Script
Write a scripted migration (Python, Node, or even a ServiceNow Scheduled Job with outbound REST) that crawls your wiki's API, pulls each page's HTML content, and POSTs it into kb_knowledge. This handles the nested link structure naturally since you can recursively follow child pages. After all articles are created, run a link-rewriting pass to update internal references with the new sys_ids.
3. Manual Copy with HTML Preservation (Smallest Scale)
If the volume is low, you can copy-paste directly into the Knowledge Article's rich text editor. The editor preserves most HTML formatting. For links, you'd manually update them to reference the new KB article URLs. This obviously doesn't scale, but works for a handful of articles.
4. ServiceNow's Knowledge Import Feature
ServiceNow has a built-in Word document import capability on the Knowledge form (Import Word Document UI Action). If you can export your wiki pages as .docx files, you can import them one-by-one. Again, not great for hundreds of pages, but the formatting fidelity is decent.
Recommended approach for nested wikis:
For a wiki with deep link hierarchies, I'd suggest:
- Map your wiki structure to KB Categories — each top-level wiki section becomes a
kb_category, nested sections become child categories. - Bulk export all wiki pages as HTML.
- Use Import Sets with a transform map that populates
short_description,text,kb_knowledge_base,kb_category, and a custom field to store the original wiki URL. - Run a fix script post-import that finds all
<a href>tags in thetextfield pointing to old wiki URLs and replaces them with the corresponding KB article links using the original URL mapping.
