FME Flow: 2026.2
SFTP Watch Publisher
The SFTP Watch publisher monitors activity on an SFTP server, and publishes messages about that activity to FME Flow topics. Activity can include adding, changing, and removing files.
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.
Configuring the Publisher
- In the FME Flow Web User Interface, select Notifications > Publications, and click Create.
- Provide a Name for the Publication.
- Protocol: Select SFTP Watch.
- Specify the Topics you want to publish to.
- Complete the remaining fields as follows:
- 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 checked, the SFTP trigger verifies a connection to the SFTP server using the specified Known Hosts File (below). If not checked, a connection to the SFTP server is not verified.
- Known Hosts File: If Verify Host Key is checked, 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: Check to watch activity in the specified Path to Watch and all subdirectories. To watch activity only in the specified Path to Watch and not in its subdirectories, leave unchecked.
- 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.
- Click Create.
Note Notifications may be delayed if Watch Subdirectories is checked, 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 notification 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.
Sample Notification Schemas
When a file is deleted
{
"sftpwatch_username": "anonymous",
"sftpwatch_host": "odan",
"sftpwatch_action": "DELETE",
"sftpwatch_path": "/log.txt",
"fns_type": "sftpwatch_publisher"
}
When a file is changed (for example, added content)
{
"sftpwatch_username": "anonymous",
"sftpwatch_host": "odan",
"sftpwatch_action": "MODIFY",
"sftpwatch_path": "/log.txt",
"fns_type": "sftpwatch_publisher"
}
When a file is added
{
"sftpwatch_username": "anonymous",
"sftpwatch_host": "odan",
"sftpwatch_action": "CREATE",
"sftpwatch_path": "/log.txt",
"fns_type": "sftpwatch_publisher"
}