function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ganesh HegdeGanesh Hegde 

Read CSV file from SFTP and write into Salesforce

Hi All,

I want to read a csv file from SFTP server and using that i need to create Accounts and Cases in Salesforce. This needs to be scheduled to run everyday. Can you please suggest a better approach for this?

Can i Install Command line data loader inside SFTP server to push the data into salesforce?
SFTP interfaces are not available in Apex as in Java. So I feel that we can not connect to SFTP from salesforce directly. Please suggest

Guy KeshetGuy Keshet
Hi Ganesh
you have quite a few options here:
we use informatica cloud for this reason. It's a paid app but it does exactly what you need, usinga  point and click interface.
IF you dont want to pay, consider one of the following:
- create your own java client on unix and use the SFDC bulk api to insert records to salesforce
- use SQLForce - a java client already written for you - and auni script
- use command line data loader ( 

good luck!
Ganesh HegdeGanesh Hegde
Hi Guy Keshet,

Thanks for the suggestion.

Can I implement the requirement if I have the windows server? We do not have a Unix server. Below are the steps

1.Write a batch script or use WinSCP Connector to read the CSV file from SFTP and transfer it to windows server.
2.Install a Command Line Apex Data Loader in Windows Server and insert the CSV contents into Account Object. Again Insert the contents into Case object The mapping files and configuration files will be placed in Windows Server.
3.Schedule step 1 and step 2using windows scheduler.

Guy KeshetGuy Keshet
Yep. That’ll work
Osvald MarkusOsvald Markus
I can offer you a completely no-coding way to do it, use middleware solution - Skyvia ( It`s a cloud-based service for no-coding integration (both-way) with clear-cut design and flexible scheduling features.