Febooti, Ltd.

Synchronize local folder with SFTP server

Suppose that there is an e-commerce website that generates PDF invoices for the customers. These files must be transferred to accounting department hourly. When synchronization is finished, an email report must be sent containing information about work done.

Get the Demo task…

Demo Task from this tutorial is available…

Overview

The Synchronize remote directories Action automatically scans for new, modified and deleted files, and detects which files must be transferred, thus reducing the time and data amount needed for automatic sync. The job is launched by built-in Task scheduler Trigger, that must be added to the Task.

Task scheduler · Recur every 1 hour

How to setup the automated file transfer? Add Connect to SFTP Action, and enter your server DNS name or IP address, along with a username and password. Then add Synchronize directories Action, and set the local and remote server directories. The Transfer mode must be set to Download, as we want our invoice files to be transferred from the remote server to the local machine.

Connect to SFTP and Synchronize directories · Download

The last step is to add Send email Action. Using Variable Wizard feature, we add current date and time to the email subject, and two dynamic variables containing the count and the list of files transferred. Each time the email is sent, the message body contains data from the last download session.

Send email with a list of downloaded files

Summary

The task is ready and running. Task scheduler Trigger starts the task every hour. Synchronize directories Action automatically looks for new files on the remote server (similarly like WinSCP or robocopy command, but for SFTP), and when found, transfers them securely to the local computer or server. Send email Action sends messages to accounting department with information about invoices from the last hour.

Further fine-tune…

In the example above, an email is always sent, even when there are no new files to synchronize. By adding If Action, the sending of email can be suppressed if no files were transferred.

In this example the invoices can be accessed via SFTP server. However, Automation Workshop can access FTP & FTPS, WebDAV, Amazon S3 storage servers, or UNC network shares automatically.

Task scheduler Trigger can be configured to not send emails during night-time or on weekends, to prevent clutter in the inbox.

Final note

Synchronize directories Action outputs a list of files that uses pipe character as a separator. To format it in more readable format, use Convert list Action, as in the provided demo task.

Assistance is here…

If you have any questions, please do not hesitate to contact our support team.

1,370,419
We're growing fast. Thank you!

Video · Monitor an FTP server & send invoice via email

Automate awesome!
Recent news
  • May 4, 2020
    Command Line Email v7.0 introduces new TLS commands. Improved console output and debugging experience. More improvements.
  • April 16, 2020
    Automation Workshop v4.1.1 ensures even more compatibility with various Windows Domain and network configurations.
  • April 2, 2020
    Automation Workshop v4.1.0 introduces Action favorites and extended view mode. Many minor UX and performance improvements.
Automation Workshop is a magic that in my view is one of the very best!—Kenny A.
Our clients
Last updated: May 4, 2020
Oct 01, 2020 · 08:52
0.008 · 0.000
0.4 · 3.8