FME Flow: 2026.2
SFTP Directory
The SFTP Directory trigger monitors activity on an SFTP server, and sends JSON messages about that activity, which can include adding, changing, and removing files.
The SFTP Directory trigger has two output ports. The success port (✔) can send a message if the trigger polls successfully. The failure port (x) can send a message if the trigger fails to poll.
Note Notifications about changed files are based on file name, size, and modification time. If a file is overwritten with one of the same size, a notification is sent only if the SFTP server also updates the modification time of the file. Although most SFTP servers update modification time, this behavior is not guaranteed.
Parameters
Note See also Working with Parameters in Automations Workflows.
Tip To test that your parameters work as expected, click Validate.
- Host: The SFTP host name. For example,
sftpserver.com. - Port: The SFTP port number. The default for encrypted connections is 22.
- Username: The SFTP user name for authentication.
- Password: The SFTP user password for authentication.
- Verify Host Key: If Yes, the SFTP trigger verifies a connection to the SFTP server using the specified Known Hosts File (below). If No, a connection to the SFTP server is not verified.
- Known Hosts File: If Verify Host Key is Yes, specify the known hosts file to use for verifying a connection to the SFTP server.
- Path to Watch: Specify a location on the SFTP server to watch for changes, using forward slashes. For example,
/this_directory. File watching is limited to locations under the user's home directory. Specify / to watch the home directory itself. For chroot users, / represents the root of their accessible filesystem, which corresponds to their home directory. For non-chroot users, / also refers to the user's home directory rather than the filesystem root. - Watch Subdirectories: To watch activity in the specified Path to Watch and all subdirectories, select Yes. To watch activity only in the specified Path to Watch and not in its subdirectories, select No.
- Poll Interval: Specify how often to poll the SFTP server.
- Events to Watch for: By default, all actions on the specified directory are monitored, including adding (CREATE), changing (MODIFY), and deleting (DELETE) files (and folders, if applicable). To monitor only one or two of these actions, expand the drop-down and adjust as desired.
Note Messages may be delayed if Watch Subdirectories is Yes, and includes a large number of subdirectories. The scale of the delay depends on the number of subdirectories, the SFTP server type, and where the SFTP connection originates.
Note Changes to existing files require an additional poll interval, after the upload completes, before a message is sent.
Note MODIFY events are triggered based on changes in file size and modification time. If a file is overwritten with one of the same name and size, a notification is sent only if the SFTP server also updates the modification time of the file. Although most SFTP servers update modification time, this behavior is not guaranteed.
Output Attributes
See Also
| Attribute | Description |
|---|---|
| time | Event time |
| source | Event type |
| error.type |
(Failure port only) Error type:
|
| error.message | (Failure port only) Error message |
| file.event | (Success port only) File action (Create/Modify/Delete) |
| file.path | (Success port only) File path |
| file.rootName |
(Success port only) File root name |
| sftp.user | (Success port only) User |
| sftp.host | (Success port only) Host |