- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 01:00 AM
Hello,
is there a way to include an external js library into servicenow instance? I need to include a pdf making library.
Just to be clear: i need this library mostly in the backend part of s-now (business rules, script includes, server side...), so i've already found a lot of ways to include a js file - but only on the front-end purposes (portal, ui-actions..).
Some libraries might be installed with npm tool (in normal non-servicenow websites), but is there a way to do this kind of thing on servicenow?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 10:33 AM
I believe you can only include external libraries using UI Scripts and those would only be available on the client side. Im not aware of a way to include them for use on the server side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 10:33 AM
I believe you can only include external libraries using UI Scripts and those would only be available on the client side. Im not aware of a way to include them for use on the server side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2019 06:19 AM
You can add 3rd party JS libraries to use on server-side script by adding the library as a Script Include. This is not practical for large libraries with a lot of dependencies, but it works fine for single-file libraries, such as MomentJS, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2020 09:51 AM
Hi
sorry to bother you. Can you tell me more about:
"so i've already found a lot of ways to include a js file - but only on the front-end purposes (portal, ui-actions..)."
I am also trying to integrate external libraries into ServiceNow, both client and server side. All I know is that you have to copy the libraries into script includes or ui scripts, but this requires processing and adaptation of the script. Did you find any other way by chance, maybe more easy?
Thanks,
Alessio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2020 12:27 PM
Still no solution to do it easily?
I would like to use a library that has also some dependences so i cannot copy all myself, would not be practical at all.