Sync encrypted files between SFTP servers on schedule

Recipe ToolsFile TransferDeveloper ToolDatabaseData ParserProductivity

What it does

When a scheduled interval triggers, this automation downloads an encrypted file from an SFTP server and decrypts the data. It parses the file into a list, encrypts the result, uploads it back to SFTP, and sends a summary email so someone knows the sync is complete.

Who it's for

Operations teams who need to exchange encrypted files on a regular schedule without manual downloads and uploads.

How teams use this

Automate daily encrypted file exchanges

Run the sync every morning so encrypted files are always current between Sftp servers without someone having to download, decrypt, and upload manually each day.

Route encrypted data to different teams

Send the completion email to different recipients based on the file content or time of day so Finance, Security, or Data teams each get notified when their data is ready.

Add conditional encryption for sensitive files

Include a condition to check the file size or name and apply different encryption levels or add a second Pgp key for files marked as highly sensitive.

Log all file transfers for compliance

Set up the automation to record each download, decryption, and upload event in a log so audits can track who accessed encrypted data and when.

How it works

  1. Run on a specified interval. This automation runs on a schedule someone sets, such as daily or weekly, to keep encrypted files in sync between systems.
  2. Download encrypted file from server. Retrieve the encrypted file from the Sftp server so it can be processed and decrypted in the next steps.
  3. Decrypt the file. Decrypt the file using Pgp so the contents can be read and parsed by the following steps.
  4. Parse CSV and re-encrypt. Parse the decrypted CSV file into a structured list, encrypt it with Pgp, and prepare it for upload back to the Sftp server.
  5. Send completion notification. Send an email via Gmail to notify someone that the file sync, decryption, parsing, encryption, and upload cycle finished successfully.