Skip to content

Provides a node.js server that connects to an sftp site and can drop a file in a specified path.

Notifications You must be signed in to change notification settings

effordDev/sf-2-sftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

sf-2-sftp1

Provides a node.js server that connects to an sftp site and can drop a file in a specified path.

Remote Site Settings

(Setup > Security > Remote Site Settings)

In salesforce you will need to add a remote site setting, the Remote Site URL should be the url of the node server.

(ex. https://node-server.herokuapp.com/ or https://8e44-97-101-87-109.ngrok.io) image

Apex

In apex class SendDataAttributesSFTP.cls, on line 5 query the data you want to send. Dont forget to change your variable name on line 12 in case you dont have any data to send.

image

Environment Keys:

  FTP_USER,
  FTP_PASSWORD,
  FTP_HOST,
  FTP_DIR,
  SECRET,
  ENC_KEY,
  IV,
  ALLOWED

If you need to support more than one ALLOWED url, create another environemnt variable called ALLOWED_02 and so on.

ENC_KEY, IV should be 128 bits (I used https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)

SECRET - can be any key of any length

Footnotes

  1. Written with tokyo 🐱‍👤🐾

About

Provides a node.js server that connects to an sftp site and can drop a file in a specified path.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published