Connectors / Core / FTP Client

FTP Client

FTP Client

The FTP Client allows you to list, upload and download files on an FTP server


The FTP Client allows you to list, upload and download files on an FTP server.


You will need to have an FTP server set up for use in order to be able to test the Tray FTP Client.

Instructions for setting up an FTP server can be found on popular tutorial sites such as Digital Ocean.

If you want to get it running on an AWS EC2 instance you would follow one of these tutorials and bear the following points in mind:

  1. Create an AWS EC2 instance (using ubuntu server or similar)
  2. Log in to the instance and install an FTP server such as vstfpd
  3. Instead of using the system firewall you would use the AWS security group to configure your AWS ports something like:
  4. As per the tutorial you are following, add a user, create a password and set their access to an ftp folder on the server
  5. As per the tutorial you are following, edit the 'vsftpd.conf' file to set the ports, enable file uploading etc.

Note that if you attempt to test accessing files on the FTP server by opening a terminal on your personal computer and logging in with the user created in step 4, you may find that your network firewall settings will prevent you from accessing files.

You can test using a client such as Filezilla or just using the List files operation in the Tray FTP Client.

For testing purposes it is obviously simpler to only set up FTP without configuring SFTP, which you would want for a production environment.


Please also see the Note on Security below for info on authenticating with SFTP.

The first thing you will have to do is click on 'New Authentication' in the step editor:

You can then select FTP / SFTP and enter the required details to authenticate with your FTP server:

The above shows auth for standard FTP.

  • Host should be the IP of your AWS EC2 instance that is hosting your FTP server
  • Username and Password are what you configured in step 4 above
  • The default Port for FTP is 21 or 22.

Note on security when using FTP

It is recommended that you use SFTP as the more secure method (this will require extra setup steps on your FTP server).

We also recommend the use of SSH keys over passwords.

The procedure for configuring SSH on your FTP server and Tray workflows would be something like:

  1. Generate an SSH key pair on your local device (It’s best to create a separate key pair for your Tray workflows rather than use existing keys, as if they’re compromised, they could be used to gain access to other programs)

  2. Add the FTP auth in Tray and enter the private SSH key from your local device (generated in Step 1):

  1. Add the public SSH key from your key pair to the authorized key file of your SFTP server which Tray will be connecting to

Note that Mojave-edition Macs may encounter an error when generating a key pair, which can be solved as per

this discussion.

Error: 'access denied'

When uploading to an SFTP/FTP server if the file name is not allowed the connector may return 'Access Denied' with no other context.

Example - Creating a file from content and uploading to the FTP server

For this example we will make use of the File Helpers connector to create a file from content and then upload it to the FTP server. The workflow looks like this:

For testing purposes a Manual Trigger is used.

For the File Helpers step you can set the operation to Create File from Content and just leave as the default name and content (to see a more realistic example of using the File Helper to create a file from data pulled from a service such as Salesforce, please see the File Helpers documentation page:

Then set the FTP Client operation to FTP upload, grabbing the file using the $.steps.file-helpers-1.file jsonpath and setting the filepath (note that this will have to be a recognised file path on your FTP server):

You can then click 'Run workflow' and go to the Debug tab to check if the workflow has run successfully and inspect the input and output data:

All Operations

Latest version: