Skip to content

jack-thomas/servicenow-knowledge-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServiceNow (Custom) Knowledge Import

ServiceNow supports importing Microsoft Word documents out of the box via their "Import Knowledge" feature. Documentation regarding this feature is available here for the Madrid release or here for the New York release. Older and newer versions of this documentation are also available on the ServiceNow product documentation website.

Unfortunately, this process is quite limited, and it wrecks formatting far more than I'm comfortable with. The goal of this repository is to build out a better (but still repeatable) process for importing Microsoft Word documents. In addition, because this new method relies on pandoc (an amazing free and open source software for converting files between an impressive variety of formats), this methodology should support far more than just Microsoft Word documents.

Important notes:

  • This method requires a local password in the ServiceNow instance. This means that SSO accounts are not supported.
  • This method does not support Knowledge Management V3 (i.e. version controlled knowledge). It shouldn't be hard to add, though. Feel free to submit a PR.
  • This method does not support custom fields. The only fields it sets are the Knowledge Base, Title (Short Description), and Contents (Text). Feel free to fork the repo to add your own custom field support.
  • The Windows commands below assume that Python 3 is the only (or default) version of Python installed. I have not validated any of this with Python 2.

How to Use

0. Install Prerequisites

First, you'll need to install Python 3 and Git. To accomplish this on Windows, navigate to their respective websites and run the .exe installers.

Once Python and Git are installed, you can install the following Python modules:

  • BeautifulSoup (Python Module)
  • pypandoc (Python Module)
  • Requests (Python Module)

To do this, run:

Windows (Powershell):
> pip install bs4 pypandoc requests

Linux (Bash):
$ sudo pip3 install bs4 pypandoc requests

1. Clone Git Repository

Navigate to the directory where you're going to store the git repository:

Windows (Powershell):
> cd C:\Users\Owner\Desktop\Git\

Linux (Bash):
$ cd ~/git

Clone the git repository locally:

$ git clone https://github.com/jack-thomas/servicenow-knowledge-import.git

2. Add Knowledge .docx Files

Create the directory - either from a file browser or the command line, as shown below:

Windows (Powershell):
> cd C:\Users\Owner\Desktop\Git\servicenow-knowledge-import
> mkdir 'Input (Word)'

Linux (Bash):
$ cd ~/git/servicenow-knowledge-import
$ mkdir Input\ \(Word\)/

Add your .docx files to that directory.

3. Run the Conversion Program

Windows (Powershell):
> cd C:\Users\Owner\Desktop\Git\servicenow-knowledge-import
> python .\convert.py

Linux (Bash):
$ cd ~/git/servicenow-knowledge-import
$ python3 ./convert.py

About

ServiceNow (Custom) Knowledge Import

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages