Importing Binary Data from ServiceNow to Access

mbernste
Tera Contributor

I have been tasked to create a disaster recovery database in the event that ServiceNow (SNOW) goes down.  I did an XML export of a SNOW knowledge base and was successful in importing it into MS Access.  I was even successful in determining the relationships between article and attachment as illustrated in the below entity relationship diagram.

Screenshot 2024-05-09 at 10.02.53 AM.png

 

Since XML is text, much like HTML, I do not know how to export the binary data such as attachments and in-line images.  As you can see from the "knowledge form" I created (see below), I can bring in the article text formatted and even the related attachment fields, but not the binary attachment itself, the field where it should display is blank.  Does anyone know how to export that data so I can reference it in the Access database?
Screenshot 2024-05-09 at 10.02.09 AM.png

 

12 REPLIES 12

I am assuming a script is used to parse the XML to place into the database. Is there a reason you don't want to use the Attachment API to grab the binary data of the attachment?
The XML export provides the sys_id of the attachment.

API access is not something that I believe I have, though I am a platform admin in the three environments.  Also, I am trying to find the least intrusive way of extracting the data and still having the article formatting (yes, I know some is lost with a rich text conversion), attachments, and inline images.  Once I cracked this nut, then I can build out a good database in the event SNOW goes down.

 

I'm still hoping the JSON solution works.  It looks promising, once I get past the Okta piece of it.

Also, no scripts are being used, just an XML import into Access after exporting the large file out of SNOW.