FTP

Getting Started with FTP

FTP modules let you monitor file changes in a selected folder, upload new files to the desired folder, and modify or delete existing files that are already in a folder.

Prerequisites

Creating the FTP Connection

Connection name Enter the name for your FTP connection.
Host Enter the FTP server hostname. E.g. myftp123.server.com
Port Enter the FTP server port number. E.g. 21
User name Enter your FTP account user name.
Password Enter your FTP account password.
Use a secure connection (TLS)

Select if you want to use a secure connection.

No
The connection will not be secured.

Explicit encryption or Implicit encryption
FTPS connection. The connection will be secured using SSL.

Reject unauthorized certificates

If this option is enabled, the FTP server certificate is verified. If the verification fails, the connection will not be created. To pass the verification, the certificate must meet one of the following criteria:

  • be signed by a Root Certificate Authority
  • be signed by an Intermediate Certificate Authority (see e.g. How certificate chains work for further explanation). In this case all the Intermediate Certificates should be installed on the FTP server.
  • be a Self-Signed Certificate supplied in the Self-signed certificate field (see below)

If this option is disabled, the FTP server certificate is not verified. We strongly advise against disabling the option as it renders the connection insecure and poses a serious security risk.

Self-signed certificate

Click the Extract button to open the upload dialog.

Upload the certificate to use the TLS with your self-signed certificate. Integromat does not retain or store any data (files, passwords) you provide. File and password are only used to extract the certificate.

For more details about certificates and keys please refer to the Certificates and Keys article.

Did you know?

You can find predefined FTP app sample templates at www.integromat.com/en/templates/ftp

Triggers

Watch files

Monitors the file content of the selected folder. The trigger is executed when a new file is inserted into the specified folder.

2019-02-01_17_13_02-Window.png

Connection Establish a connection to the FTP account.
Folder

Select the folder you want to watch.

Only one folder per scenario is allowed. Subfolders are ignored.
To keep track of multiple folders, create an independent scenario for each of them.
Maximum number of returned files Set the maximum number of results that Integromat will work with during one cycle. If the value is set too high, the connection may be interrupted on the side of the given third-party service (timeout). Integromat has no influence on this. We recommend that you set a lower value and either define a higher value for the maximum number of cycles or run the scenario more frequently.

Choose where to start

Set when do you want to start the FTP file monitoring from.

2019-02-01_17_18_10-Window.png

Actions

Upload a file

Uploads a file to the FTP server.

Connection Establish a connection to the FTP account.
Folder Select the FTP folder you want to upload the file to.
Source file Select (or map) the file you want to upload to the FTP server.
Append to an already existing file If this option is enabled and the file already exists on the FTP server, its content will be appended. If not, the content of the file will be overwritten.
Create folders if don't exist If this option is enabled and the folder you have entered to the Folder field does not exist on the FTP server, the module will create the folder.

2019-02-01_17_29_20-Window.png

Delete a file

Deletes a file from the specified folder.

Connection Establish a connection to the FTP account.
Folder Select the FTP folder you want to delete a file from.
File name Enter the filename (including file name extension). E.g. image.png

Create a folder

Creates a new folder.

Make sure you have sufficient permissions to create a folder and/or the directory protection is disabled.
Connection Establish a connection to the FTP account.
Folder path Select the FTP folder you want to create a folder at.
New folder name Enter the name for the new folder.

Delete a folder

Deletes a folder.

Make sure you have sufficient permissions to delete a folder and/or the directory protection is disabled.
Connection Establish a connection to the FTP account.
Folder Select the FTP folder you want to delete.

Move a file or folder

Moves a file from one folder to another.

Connection Establish a connection to the FTP account.
Old file path Enter the path you want to move the file from. For example /folder1/test.txt
New file path Enter the path you want to move the file to. For example /folder2/test.txt. (The target file name can differ from the source file name.)

List of files/folders in a folder

Retrieves file and/or folder details.

Connection Establish a connection to the FTP account.
Folder Select the FTP folder you want to search in.
Show Select whether you want to retrieve information about files or folders, or both.
Search Enter the search term to filter returned files/folders by. If no search term is entered all files and folders from the specified folder will be returned.
Maximum number of returned files Set the maximum number of retrieved files by this module.

Get a file

Retrieves a file from the FTP server which can be further processed, e.g. attached to the email message.

Connection Establish a connection to the FTP account.
File path Enter the path of the file you want to retrieve.

The Example

The file is retrieved from the FTP server and attached to the Gmail email message.

2020-09-04_12_37_01-Integration_FTP__Gmail___Integromat.png

Change permissions

Connection Establish a connection to the FTP account.
Change permission settings of Select whether you want to change permissions of the file or the folder.
File path Enter the folder or file path.
Permissions

Set the desired file/folder permissions. Use the chmod parameters. E.g. 777 or -rwxrwxrwx

2019-02-04_12_19_01-Window.png

You can find more details on the chmod Man Page.

2019-02-04_12_38_57-chmod_Man_Page_-_Linux_-_SS64.com.png

 

Troubleshooting

If you are experiencing issues with the FTP app either during the connection creation or during a module's operation, try to use one of the popular FTP clients (e.g. WinSCP) and try to perform the same action (e.g. create a connection, list files in a folder, etc.) with the FTP client. If you are experiencing the same issues also with the FTP client, the reason might be a misconfiguration of the FTP server.

Please note that there are two FTP modes: active and passive. As the Integromat FTP app requests the passive mode, the FTP server must support the passive mode in order an FTP session can be successfully established during the following four steps:

  1. The Integromat server sends the PASV command to the FTP server on port 21 (or 990 if Use a secure connection (TLS): "Implicit encryption" option has been chosen in the connection setup). This port must be open on the FTP server's firewall.

  2. The FTP server should send 227: Entering Passive Mode (h1,h2,h3,h4,p1,p2) in response. The response specifies:

    • The IP address (h1, h2, h3, h4) the Integromat server should connect to. When the FTP server is behind a NAT, the FTP server needs to provide its external IP address. It is common that the FTP server is not configured properly and provides its internal IP address instead that cannot be connected to from the Integromat server, e.g.:
    • A random, high-numbered (ephemeral) port (p1, p2) that the Integromat server can connect to. This port must be open on the FTP server's firewall.

  3. The Integromat server initiates a connection to the IP address and port specified in the response.

  4. The FTP server responds with an ACK. The FTP session has now been established.

 Sources

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.