Sync UTF-16 files from Google Drive to SFTP

Recipe ToolsMarketingWorkatoDocument/FileSales EnablementDeveloper ToolFile Transfer

What it does

Every 5 minutes, this automation downloads a file from Google Drive and converts it to UTF-16 encoding using Python. The converted file uploads to SFTP and backs up in FileStorage.

Who it's for

Engineering teams who need to keep UTF-16 encoded files synchronized between Google Drive and SFTP without manual conversion.

How teams use this

Automate encoding conversion for data pipelines

Convert files on a schedule without manual intervention, ensuring downstream systems receive properly encoded data. This keeps data pipelines running smoothly without delays.

Maintain compliance with legacy system requirements

Sync files to SFTP in the correct encoding format to meet legacy system standards. The automation handles conversion so teams do not need to manage encoding manually.

Add email notification on conversion failure

Include a step that sends an alert email when the Python conversion fails, so the team knows immediately if a file cannot be processed. This requires adding an email step after code execution.

Route files to different SFTP paths by type

Filter files by name or metadata and upload each type to a different SFTP folder based on a condition. This requires adding a conditional branch after conversion to route files to the correct destination.

How it works

  1. Check for files every 5 minutes. The automation runs on a schedule, checking every 5 minutes for files that need conversion and sync.
  2. Download file from Google Drive. Retrieve the file contents from Google Drive that will be converted to UTF-16 encoding format.
  3. Convert file encoding with Python. Execute Python code to transform the file contents from its current encoding into UTF-16 format for compatibility.
  4. Upload converted file to SFTP server. Transfer the encoded file to the SFTP server so it is available for downstream systems and integrations.
  5. Store backup in FileStorage. Save the converted file to FileStorage as a backup copy for audit and recovery purposes.