The CreatorCon Call for Content is officially open! Get started here.

How to import excel file from Mid Server to import set table in service now.

Community Alums
Not applicable

Hi Team,

Can you please let me know how can I import files from Mid Server to Service Now.

Mid Server will be present on host system. And Host will post data in excel format to the mid server.

How can I pull that file into service now. Is there any direct configuration that is available.

If no, then what all scripting that I have to do?

Please do not give link to service now guru. I have already checked it and there is no update set available and it is outdated.

Really appreciated if any one could help me with this. I need to do this as an urgent requirement.

Regards,

Sindhuja.

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sindhuja,

Following link should be helpful

https://community.servicenow.com/community?id=community_question&sys_id=54d2cb61dbd8dbc01dcaf3231f9619dd

https://community.servicenow.com/community?id=community_question&sys_id=b84f4290db7a17001cd8a345ca96...

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

Hi Ankur,

 

If I want to go with below solution, where do I have to write the probe code?

var probe = SncProbe.get("Command");
probe.setName("cd /Users/me/Desktop && cat example.csv | base64");
probe.create("<MID Server Name>");

The response to this will be a base64 encoded string of the file that will get written to ECC Queue in the response. You can then turn this into an attachment with a script on the instance

var encStr = '<long base64 encoded string>';
var stringUtil = GlideStringUtil;
var attachment = new Attachment();
attachment.write('<table>', '<record sys_id>', '<file name>', 'text/csv', stringUtil.base64DecodeAsBytes(encStr));

 

Regards,

Sindhuja.

Hi Sindhuja,

check this link; it would help you

http://www.john-james-andersen.com/blog/service-now/command-line-execution-with-servicenow-mid-serve...

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

Hi Ankur,

 

I wanted to know, where do I have to write below code. Is it in schedule job?

var probe = SncProbe.get("Command");
probe.setName("cd /Users/me/Desktop && cat example.csv | base64");
probe.create("<MID Server Name>");

Have you worked on similar kind of requirement and is it possible?

 

Regards,

Sindhuja.