Suppose that there is an e-commerce server that generates invoices for website's customers. The invoices need to be sent to accounting department as soon as they appear on the server. The server has an FTP or SFTP Service that allows authorized client computers to connect to it.
Overview
This tutorial shows how to create an automated task that will connect to a remote FTP server to monitor for file changes in a remote directory, then the task will download .pdf
files from the remote server and will email them to the finance department.
How to monitor an FTP server for new files? First, create a Task and add FTP Watcher Trigger. Set the directory to monitor: /home/
and set the file type to *.pdf
to watch only all pdf files. Then Task Wizard will show Connect to FTP properties, where server name and credentials must be provided.
Add Download File Action and choose Full path and filename from FTP Watcher using Variable Wizard. The Filename will automatically be replaced with the new file that was found on the remote server.
The last step is Send Email Action, with an attachment of the invoice.pdf file. Again, use Variable Wizard to choose the Local file variable provided by the Download File Action from the previous step. Also, fill necessary email fields, namely From, To, Subject and Email text.
Summary
FTP Watcher Trigger acts as scheduled task that periodically checks a remote FTP server for file changes. File mask *.pdf
causes the trigger to fire only on new PDF files. The connection details are provided in the Connect to FTP Action. Next, the Download File Action is automatically transferring remote file to the local folder C:\Downloads\
where it is picked up by Send Email Action which sends it to the accounting department's email address.
Variable Wizard is responsible for the automation process that each time a new file appears in the remote server the filename is passed to the next relevant actions.
Conclusion
Using Automation Workshop for MS Windows, it is possible to achieve very high level of automated SFTP and FTP file transfers, including Downloads, Uploads and Directory Synchronization. The task works in unattended manner—it schedules itself and does FTP transfers completely automatically as long as folder structure or credentials on remote server does not change.
Assistance is here…
If you have any questions, please do not hesitate to contact our support team.