How to export jpg / pdf images, attached to table records via Export Sets?

georgimavrodiev
Mega Guru

Hello All,

I am exporting records from one of my custom tables via Export Sets.
These records are being exported from my DEV ServiceNow Instance to a specific folder of a MID Server of mine, installed on a Windows Server.
The exportation is happening through csv files. This is the format option I use for the records exportation and I want it to stay the same (csv).
Some of the records have jpg images and pdf files attached to them.
Once the Export Set gets run -> the records get exported to the specified MID Server location as a csv file. Yet, the attached pdf or jpg files don't get exported.

Could you please share with me some thoughts how I can achieve exporting the attachments of the records to the folder in which the csv file of the records gets directed during the export?

Thank you!

Regards, Georgi

2 REPLIES 2

nehasr1288
Tera Expert

Export sets support multiple file types for exporting and pushing data.


You can export to these formats:

  • CSV
  • XML
  • Excel
  • JSON

Ok, I found the reason why I cannot see the attached to the exported records files, after the Export Set gets completed.



It is simple - Export Sets do not export attachments to records.




I will review the below topics and try to use one of the described approaches:


https://www.servicenowguru.com/scripting/download-attachments-zip-file/


https://docs.servicenow.com/integrate/inbound_rest/concept/c_AttachmentAPI.html
Outbound REST web service



Closing this thread as "Assumed Answered".




Regards, Georgi