Latenode

Upload Gmail attachments to an SFTP server

This template starts when Gmail receives a new attachment, downloads the file, and uploads it over SFTP. Use it to archive invoices, signed PDFs, or other inbound files on a host your team already uses.

Connect Gmail and SFTP. Put host, user, and password on the SFTP connection. If the server speaks FTP only, perform the upload in a JavaScript node and keep those credentials in that node.

Updated Sep 16, 2026Est. run: 6sEst. cost: $0.0004
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Uploads new Gmail attachments to your SFTP host without a manual client
  • Starts when Gmail receives an attachment
  • Keeps host, user, and password on the SFTP connection
  • Can upload from JavaScript instead when the host speaks FTP only

How it works

1
Trigger

Watch Gmail attachments

The scenario starts when Gmail receives a new attachment in the inbox or label you watch.

2
Action

Download the file

Latenode gets the attachment bytes so they can be written to the remote host.

3
Action

Upload over SFTP

SFTP writes the file to the remote path. Put host, user, and password on the SFTP connection. If the host is FTP only, upload in JavaScript instead and keep those credentials in that node.

Setup guide

1

Connect Gmail

Add a Gmail connection with access to the inbox or label that receives the attachments.

2

Connect SFTP

Add an SFTP connection. Enter host, user, and password there. Choose the remote directory that should receive files.

3

Watch attachments and upload

Add a Gmail trigger for new attachments, download the file, and push it over SFTP. Use the original filename on the remote path. If login fails because the server is FTP not SFTP, move the upload into a JavaScript node and keep host, user, and password in that node.

Requirements

A Gmail inbox or label Latenode can read
An SFTP host, username, and password stored on the SFTP connection
A remote folder Latenode can write to

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.