Export ServiceNow KB Articles in Bulk as PDFs (with Images) and Upload to SharePoint Automatically

1__PrabakaranC
Tera Contributor

📄Introduction

There is currently no direct API in ServiceNow to export Knowledge Base (KB) articles as PDFs with embedded images. While ServiceNow does offer an API that returns the HTML content of an article, handling and preserving the styles and layout externally can be complex and unreliable.

Although there is a Convert to PDF option available within ServiceNow scripting, it only exports the article body with images, omitting critical metadata such as:

  • Article number
  • Author
  • Category
  • Other contextual details

To capture both article content and metadata, one alternative is to use the Print-Friendly View of each article. While this method works well for a small number of articles (e.g., less than 10), it quickly becomes impractical when dealing with hundreds or thousands of articles.

 

To solve this problem, you can use a Playwright automation script to:

  • Automate the export of KB articles using the Print-Friendly View

  • Convert the articles to PDF format

  • Upload the generated PDF files to a specified SharePoint folder

This approach allows for scalable and efficient bulk exporting of KB articles along with images and metadata.


Regards,
Prabakaran C

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Prabakaran C
LinkedIn: https://www.linkedin.com/in/prabakaran-c-534b6826a
****************************************************************************************************************

 

1 REPLY 1