How to automate email to SFTP transfers using Couchdrop

Posted on Aug 9, 2022 • Updated on Nov 25, 2025

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, but how do you get those files into an SFTP server? 

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 Couchdrop mailboxes 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, Google Drive, or, in this case, an SFTP server. 

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 an SFTP server

With Couchdrop mailboxes, it's simple to set up email to SFTP transfers. The most straightforward way is by using Couchdrop as the SFTP server as well, since your server is set up instantly and automatically at sign-up. In that case, simply create a hosted storage folder and direct the mailbox to that folder and you're done. 

For the sake of this guide, we'll assume that you need to use an external SFTP server as the endpoint. In that case, what you need to do is configure the SFTP endpoint, set up the mailbox & direct it to that endpoint, then provide the mailbox address to the automated systems or users that will be emailing the files. 

Step 1 - Configure remote SFTP endpoint

The first step is to configure the destination SFTP server where you want the files to end up. 

To do this in Couchdrop, choose to connect to partners/providers and then choose SFTP Server. 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. If you need help making a connection, see our guide on how to connect to an SFTP server

When you've successfully connected, the SFTP server will be an endpoint you can use for any file ingestion and sharing features. For example, you could move the file from a Google Shared Drive folder into the SFTP folder to transfer the file to the remote server via SFTP. 

Creating a mailbox pointing to the server will allow files to be emailed to a folder on the server. 

Step 2 - Configure the mailbox

Once you have a successful connection to the SFTP server, you'll need to create a mailbox and configure a server directory as the path, which Couchdrop will let you select from a menu instead of having to copy and paste. 

Couchdrop will then generate a 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 server. The mailbox should strip the attachment and send it to the folder you configured earlier in this step. You can check this either in the server 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. 

Can human users use mailboxes too? 

While human users can use mailboxes as well, email lacks in security and control compared to other methods, so we don't recommend using it unless there's no other option, which can be the case for some automated systems. 

Instead of sending users a mailbox address to email files as attachments, we recommend using upload links instead, which are secure, brandable web portals where users can upload files into an attached directory, including those on SFTP servers. Upload links are more secure and include more controls for you to use while still being simple and straightforward for your users. 

Step 4 - Create a Couchdrop automation

To automate file processing along with the transfer itself, you can use the mailbox as a file action trigger. This is an optional step, but it can greatly improve efficiency when organizations only need to send some files to the server. 

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 could be sent elsewhere or even deleted. 

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 email to SFTP transfers for 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