Anyway to upload an excel file via REST or SOAP and then utilized for import set??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 12:09 PM
I would like to be able to "push" a file from an individual server to ServiceNow instance and then have it processed as an import set. Any way to do this??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 12:20 PM
Have you tried creating a FTP/SFTP (if you can use any of these servers to host the excel file) data source something like this
Or you upload that excel file as an attachment via REST/SOAP (Sending an attachment to ServiceNow via Web Services - ServiceNow Guru ) and then create a data source something like this to use that attchment as an import set :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 12:23 PM
There are going to be many (1000) or so files so FTP won't work as we don't know at any time what file needs to be uploaded.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 03:38 PM
Then making your own rest Service that takes the file as a BASE64 string may be your best choice. You can use the Script Include Attachment or do it by hand dealing with the attachment or you can do it directly like the code below:
var sa = new GlideSysAttachment();
sa.write(target, filename, contentType, value);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 03:42 PM
Yea, this might be the way to go and have some target that is just a holder. Then process the attachment and remove it. Then process the next attachment, etc...
Make sense?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 07:22 AM
John,
If the file is a single record or type of record. You may just want to process it in your Script REST/SOAP service. If you are doing different types of imports with the same call, then you'll want to use the Import Set/Transform capabilities.