Sync encrypted files to SFTP every 5 minutes

Recipe ToolsMarketingFile TransferDeveloper Tool

What it does

Every 5 minutes, this automation lists files on an SFTP server, downloads them, and encrypts each one. The encrypted files upload back to the server so sensitive data stays protected and in sync.

Who it's for

Security teams who need to encrypt and back up files on SFTP servers on a regular schedule.

How teams use this

Encrypt backups on a regular cadence

Files download, encrypt, and upload every 5 minutes so backups stay current and protected. The team does not have to run this manually or monitor the server.

Adjust the sync interval for compliance

Change the Clock trigger from 5 minutes to hourly or daily to match the team's data retention and encryption policy. The rest of the flow stays the same.

Add a filter to encrypt only new files

Include a condition to check the file timestamp so only files created since the last run are encrypted. This reduces processing time and only protects files that changed.

How it works

  1. Run every 5 minutes. The Clock triggers this automation on a 5-minute interval so encrypted files stay in sync with the SFTP server.
  2. List files on the SFTP server. Retrieve the list of files from the SFTP server folder so the automation knows which files to process next.
  3. Download each file from SFTP. Download files from the SFTP server one at a time so each file can be encrypted before it uploads back to the server.
  4. Encrypt the downloaded file. Encrypt each file using PGP encryption so sensitive data is protected before it returns to the SFTP server.
  5. Upload the encrypted file. Upload the encrypted file back to the SFTP server so an encrypted copy is stored alongside the original file.