Importing csv files from SFTP server to SNOW using Powershell Scripts

ULLASKUMAR K
Tera Contributor

We have a requirement to fetch the csv files from the SFTP server to Mid server using PowerShell scripts. 

 

Basically, we want to establish an inbound integration. The third party team will be placing the files into the SFTP server and we would like to import them into ServiceNow tables via Mid Server.

 

Below methods I have tried. 

  1. The Source system does not have any End point URLs, hence we cannot make use of REST
  2. Tried Data source method, but the SFTP server is private and hence it cannot establish the TCP connection from ServiceNow. Hence getting SSH connection errors

Recommendation is to use PowerShell scripts to fetch the files from SFTP to Midserver and then push it to SNOW. 

 

I am aware of Remote File Importer(Update set) which can import the files from Mid server. 

 

But the challenge I have is to fetch the files from SFTP to Mid server, as I have limited knowledge on PowerShell scripts. 

 

Any suggestions on this will be greatly appreciated.

1 REPLY 1

Luxo Nadappan
Tera Guru

Hi ,

 As you said, you need PowerShell script to move script from one location to another . 

1. Create a file which has  command Move-Item cmdlet (command to move) 

2.Next is you to create task in task scheduler to run the file 1.

 

Regards,

Luxo