When systems don't natively share the same protocol support, they often don't play nice together. For instance, one system might only be able to export files via email, and the other will only accept SFTP as a method of interacting with it.
Bridging these sorts of gaps can become challenging and often requires in-house scripts or multiple software products to daisy chain these systems together. While this can work as a makeshift solution, it's much more stable to have one system that can manage the entire process, especially as requirements change.
The mailbox feature in Couchdrop does just that for systems that only work with email. We'll explain how to set up an email to SFTP transfer using cloud storage as an intermediary and how to automate the entire process in this guide.
How do Couchdrop mailboxes work?
Couchdrop mailboxes are unique email addresses that automatically ingest email attachments and route them to a connected storage directory. When setting up a mailbox, you'll connect a storage directory, which can be a folder in hosted storage or in any of the 30+ storage integrations like SharePoint or Google Drive.
When an email is sent to this mailbox, Couchdrop will immediately take the attachment and transfer it to the connected directory. The body of the email can be optionally saved as an accompanying .txt file as well.
But there is much more Couchdrop can do than simply receive the file; you can also automatically push files via SFTP, FTP, or between cloud providers by setting up an automated workflow.
How to email a file to Google Drive automatically
There are many systems that don't support FTP or SFTP, but can email files to a specified address, often as soon as the file is generated. Couchdrop can make sure that the file arrives in cloud storage without manual steps.
For the sake of this guide, we will use Google Shared Drives for the cloud storage platform, but this process can be used with any compatible storage integration.
The file transfer will follow this path: Email ingestion → Google Shared Drive → Remote SFTP location and use automations to remove the need for manual intervention.
Step 1 — Connect the storage integration
Before adding the Mailbox, you'll need to connect the Google Shared Drive to Couchdrop. In this scenario, the Shared Drive folder will act as the central repository for data at rest and will be where files are received. From there, some files will be transferred to the remote SFTP server.
You can add a new storage connection from any page. When adding a storage connection, choose Google Workspace and fill out the fields, and choose a folder to act as a root (the folder that will be used as the repository in this case).
For a detailed guide on connecting Google Workspace, see our Google Workspace connection guide.
Step 2 - Configure the mailbox
Once you have a successful connection to the Shared Drive folder, you'll need to create a mailbox and configure the Shared Drive location as the path, which Couchdrop will let you select from a menu instead of having to copy and paste.
Couchdrop will then give you your unique mailbox address, which you can copy directly or share via email.
You can try testing the inbox by emailing a message with an attachment to the email address you created and ensuring it arrives in your destination storage. The Inbox should strip the attachment and send it to the folder you configured earlier in this step. You can check this either in your Google Shared Drive itself or within Couchdrop’s interface.
Step 3 - Add the email to automated systems
Go into the automated system and enter your unique mailbox email as the recipient for the file. Doing this will send the file directly to the mailbox without a human having to be involved. Remember, this mailbox is connected to a folder in the Shared Drive, so what this is actually doing is having the system email the attachment directly to the Google Drive folder.
Step 4 - Configure remote SFTP endpoint
When you've tested that the email ingestion is working correctly, next you will need to configure the destination SFTP server where you want some files to be transferred to afterwards.
This is a similar process to connecting Google Drive, only select SFTP Server instead of Google. Fill out the fields to connect to the SFTP server as a user and have the folder on the SFTP server appear inside Couchdrop's virtual file system.
When you've successfully connected, the SFTP folder will be an endpoint you can use for any file ingestion and sharing features. For example, you could move the file from the Google Shared Drive folder into the SFTP folder to transfer the file to the remote server via SFTP.
But by creating an automation, the entire process can be done without manual intervention.
Step 5 - Create an automation to bridge systems
As we have both the ingestion method ready to go and the SFTP endpoint, it’s now a case of putting it all together and configuring file transfer from Google to the SFTP endpoint.
The easiest way to do this is from the Mailbox configuration in the File Actions tab. This creates a pre-configured workflow and attaches the Mailbox as the trigger.
From there, you can add conditions or actions to automate the transfer. In this case, suppose we only want to transfer some of the files to the SFTP server. First, add a condition for filename matching a specific name or type, such as *.csv. This will only transfer CSV files to the server, while other files will remain in the Shared Drive folder.
Then simply pick to move or transfer/copy the file and choose the SFTP folder configured in Step 4 as the location. When enabled, whenever a file is sent to the mailbox, the automation will check to see if it's a CSV file and if it is, transfer that file to the remote server.
And that's it! The entire process of emailing a file to cloud storage and conditionally transferring files to a remote SFTP server is now automated.
Try Couchdrop for automating email to SFTP transfers
Couchdrop makes secure automated file transfers simple and straightforward. All transfers and settings are handled in the modern, intuitive web interface, including configuring mailboxes and building automations without code.
Want to try setting up an automated file transfer yourself? All Couchdrop registrations get a 14-day free trial with instant access and no credit card required. Sign up for your Couchdrop trial now.