HI I want to export the table data from Service Now instance to SFTP at 6:00 AM

Trupti Krishnam
Tera Contributor

I want to export the table data from Service Now instance to SFTP Location in Json format. evreyday at 6:00 AM

1.I tried using scheduled export set and tried to send the file to mid server but the empty file is being sent to the mid server

2.And as my another approach I wrote a schedule job to fetch the  table details and add it as an attachment to the sys_attachment table .Then I used Flow designer to send the file ..., Here i used the SFTP action when I run it its throwing an error as 'SSH_CONNECTION_FAILURE. Timed out while waiting for SSH protocol ID string'

 

Please help me with the Problem

@Ankur Bawiskar  @Parag_Sanyashiv  @Rahul Priyadars 

2 REPLIES 2

chetanb
Tera Guru

Hello @Trupti Krishnam ,

 

Did you try convert data using GlideRecord API . then convert the data to JSON format using JSON.stringfy()string  function. 

Use SFTP API .i.e. sftpClient to connect to SFTP server and upload the JSON data to specified location and close the connection and scheduled the script to run daily at 6 AM using scheduled job.

 

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Regards,

CB

@chetanb can you explain me with simple sample example

thank you