There may be times where you want to grab a CSV, Excel, or XML file from a place on the Internet to perform your imports. Maybe your third party integration system publishes XML documents that are accessible on demand on or an scheduled basis. Your goal is to grab the file at the given URL and import it into your ServiceNow instance. The easiest way to do this is via a Data Source set up to grab files via HTTP.
Let’s say I have a third-party tool that publishes a CSV file that contains data that is supposed to generate incidents in ServiceNow. The tool publishes the CSV file at the following URL every day at 3AM. We want to create a data source that grabs the file, imports the data into an import set, and generates incident records in our ServiceNow instance. Let’s say the URL for our file will always be: http://john-james-andersen.com/wp-content/uploads/httpincident.csv
First, we create the data source:
Here are the settings I used:
Name: Incidents via HTTP
Import Set Table Label: Incident Import (I made this up for the example)
Import Set Table Name: u_incident_import (this was generated for me)
Type: File
Format: CSV
File Retrieval Method: HTTP
File Path: /wp-content/uploads/httpincident.csv
Server: john-james-andersen.com
It is important to note that you don’t prefix your Server name with “HTTP://”. The system will do this for you.
Also, note, that if your URL requires basic authentication to access the resource, you can include the username and password on the data source record.
I then create the following transform map for my CSV file:
Once I run a load, and transform, I see the following incidents in my system:
I will surely test it, looking for kind a same from last few days!
Thanks for this write up, haven’t seen any mention of Data Source HTTP on the sn wiki, and it fits perfectly for a problem I was trying solve.
I want to use data source which will pull the XML. But the file is in an Intranet and not cannot be connected via internet. Is there a way i can by pass the connection via MID Server so that it fetches the file.
@vineethdear – Unfortunately, SN does not offer an OOB way to to pull the file through the MID Server. You could script it to do a REST-based call through the MID Server and then handle the file though. I don’t have any examples on me, but that might be something to consider. Also, Crossfuze (SNCGuru) used to have a File Importer that could grab files from the MID Server. May want to check that out as well.
Hello John,
This article was very helpful. Thanks !
But I am stuck at using the same configuration to access file stored at our sharepoint site which requires authentication.
We are getting error at the test load itself.
We also noticed that while running the test load the system is replacing all the special characters with %20 (for space), %40 (for @) etc.
Kindly provide your input on this.
Regards,
Shyama
Hi Jhon,
Thanks for nice explanation.
I tried this approach but unfortunately it didn’t work. Data source connection was successfully but not able to see the records in staging table. Anything am I missing here ? Please point me in right direction.
Thanks,
Narendra
goo article, but your written text is very difficult to see. Light gray text on a light gray background is extremely difficile to see.. And the text I am typing in this reply window is barely visible. .I have to select the text to verity what I typed.
Hi John,
I used your article for a similar approach but when I tried to follow the exact same step, I get error at data load. Can you please help me
IPTV is changing how we consume television by providing content
through the internet. In contrast to traditional cable,
IPTV provides versatility with many channels and on-demand choices.
Applications like IPTV Smarters Pro allow you to stream HD video with little buffering.
When picking an IPTV service, make sure to choose a trustworthy provider to guarantee a reliable and legal
service. Dive into the world of IPTV and experience a modern, customizable TV experience!