Get started with the FTP connector

Use the FTP connector to monitor, manage and create files on an FTP server.

To use any connector, you first need to create a logic app. You can get started by creating a logic app now.

Connect to FTP

Before your logic app can access any service, you first need to create a connection to the service. A connection provides connectivity between a logic app and another service.

Create a connection to FTP

Prerequisites

  • An FTP account

Before you can use your FTP account in a logic app, you must authorize the logic app to connect to your FTP account.Fortunately, you can do this easily from within your logic app on the Azure Portal.

Here are the steps to authorize your logic app to connect to your FTP account:

  1. To create a connection to FTP, in the logic app designer, select Show Microsoft managed APIs in the drop down list then enter FTP in the search box. Select the trigger or action you'll like to use:
    FTP connection creation step
  2. If you haven't created any connections to FTP before, you'll get prompted to provide your FTP credentials. These credentials will be used to authorize your logic app to connect to, and access your FTP account's data:
    FTP connection creation step
  3. Notice the connection has been created and you are now free to proceed with the other steps in your logic app:
    FTP connection creation step

Use a FTP trigger

A trigger is an event that can be used to start the workflow defined in a logic app. Learn more about triggers.

Important

The FTP connector requires an FTP server that is accessible from the Internet and is configured to operate with PASSIVE mode. Also, the FTP connector is not compatible with implicit FTPS (FTP over SSL). The FTP connector only supports explicit FTPS (FTP over SSL).

In this example, I will show you how to use the FTP - When a file is added or modified trigger to initiate a logic app workflow when a file is added to, or modified on, an FTP server. In an enterprise example, you could use this trigger to monitor an FTP folder for new files that represent orders from customers. You could then use an FTP connector action such as Get file content to get the contents of the order for further processing and storage in your orders database.

  1. Enter ftp in the search box on the logic apps designer then select the FTP - When a file is added or modified trigger
    FTP trigger image 1
    The When a file is added or modified control opens up
    FTP trigger image 2
  2. Select the ... located on the right side of the control. This opens the folder picker control
    FTP trigger image 3
  3. Select the > (right arrow) and browse to find the folder that you want to monitor for new or modified files. Select the folder and notice the folder is now displayed in the Folder control.
    FTP trigger image 4

At this point, your logic app has been configured with a trigger that will begin a run of the other triggers and actions in the workflow when a file is either modified or created in the specific FTP folder.

Note

For a logic app to be functional, it must contain at least one trigger and one action. Follow the steps in the next section to add an action.

Use a FTP action

An action is an operation carried out by the workflow defined in a logic app. Learn more about actions.

Now that you have added a trigger, follow these steps to add an action that will get the contents of the new or modified file found by the trigger.

  1. Select + New step to add the the action to get the contents of the file on the FTP server
  2. Select the Add an action link.
    FTP action image 1
  3. Enter FTP to search for all actions related to FTP.
  4. Select FTP - Get file content as the action to take when a new or modified file is found in the FTP folder.
    FTP action image 2
    The Get file content control opens. Note: you will be prompted to authorize your logic app to access your FTP server account if you have not done so previously.
    FTP action image 3
  5. Select the File control (the white space located below FILE*). Here, you can use any of the various properties from the new or modified file found on the FTP server.
  6. Select the File content option.
    FTP action image 4
  7. The control is updated, indicating that the FTP - Get file content action will get the file content of the new or modified file on the FTP server.
    FTP action image 5
  8. Save your work then add a file to the FTP folder to test your workflow.

At this point, the logic app has been configured with a trigger to monitor a folder on an FTP server and initiate the workflow when it finds either a new file or a modified file on the FTP server.

The logic app also has been configured with an action to get the contents of the new or modified file.

You can now add another action such as the SQL Server - insert row action to insert the contents of the new or modified file into a SQL database table.

Connector-specific details

View any triggers and actions defined in the swagger, and also see any limits in the connector details.

Next Steps

Create a logic app