Knowledge Article Migration

aashishdham
Tera Contributor

Hello everyone,

We are migrating legacy knowledge articles from an external system where all articles are stored in HTML format in an on-prem SQL Server database.

How is this type of migration typically handled in ServiceNow? The articles include images embedded as Base64 within the HTML, as well as links to related documents that reference the legacy article ID.

Looking for guidance or best practices on handling these scenarios during migration.

Thank you!

4 REPLIES 4

Dominik Simunek
Tera Guru

I went through such a migration a few times, and I have seen various solutions, either using a Java migration app built specifically for this migration, or a REST API based migration followed by few Fix Scripts. I can say it is never super simple.

 

The key point is that you won't be able to migrate it in just one step. You need to migrate the article content first, then fix images/attachments inside the content, then fix the links. Multiple steps are typically needed as you cannot fix links until you know where the referenced article got created (what is its Number/SystemID). You need to master crawling through the content to find those links/attachments in the HTML to update them.

Thanks, Dominik!

I’m thinking along the same lines. The plan is to import all article HTML into a staging table in ServiceNow and then run a fix script to fix interlinked articles and update image references.

 

The biggest challenge right now is the custom HTML used in the legacy system. There are several proprietary tags for things like hyperlinks, interactive tables within the article body (with sorting and search powered by JavaScript), tooltips, and more.

 

Do you have any suggestions on how we should handle these? Tooltips in particular are used on both text and images, which makes the conversion a bit more complex.

Then it is even more challenging as in my opinion it means you have to build several crawlers through the HTML to "translate" it into some HTML that fits ServiceNow KM expectations.

 

I did this once when migrating big custom KB content, and we used custom scripts (e.g., in Transform Map, or even in a custom Java app built for the migration) that handled these transformations (e.g., replacing custom tags with standard HTML tags). Be aware that some of these transformations can be done only once you insert the articles or related attachments into the target tables as only then you will know their "sys_id". So the approach might be to insert articles in draft state, and then run your fix scripts to replace obsolete links to attachments with the new links when you already know their sys_id. To do this properly, you again need to store the old IDs also so that you can do these replacements.

 

I cannot advice more just by writing here, as it is not a straight-forward and every KB migration is a bit specific.

Nayan ArchX
Giga Guru

ServiceNow Knowledge Migration – Best-Practice Approach

1. Overall recommended migration architecture

Typical pattern

 
Legacy SQL Server (HTML) --> Extract (ETL / Script) --> Transform (HTML cleanup + mapping) --> ServiceNow Import Set --> Transform Map --> KB Articles (kb_knowledge)

 

 

Challenge Best practice

HTML contentClean + normalize before load
Base64 imagesConvert to attachments
Legacy linksTwo-pass rewrite using mapping
DocumentsAttach to KB article
Migration toolImport Sets or ETL + REST
ValidationAutomated + manual QA

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks

Nayan Patel

IT ServiceNow Consult, ServiceNow ArchX

If my response has resolved your query, please mark it Helpful by giving it a thumbs up and Accept the Solution