Skip to content

SFTP Activities

Version: 1.0.0  ·  ID: zoan-packages-sftp  ·  Author: Zoan Software

The SFTP package transfers files securely with a remote server using the SFTP (SSH File Transfer Protocol) protocol. It is widely used in integrations between companies: upload files to a server (a batch of invoices for a supplier), download files left there (reports from a bank), or manage remote folders.

All operations work on a session that you open with SFTP Connect and share with the other activities:

  • With body: activities inside inherit the session; When the connection ends it closes itself.
  • Without body: you save the session in a variable and close it with SFTP Close.
SFTP Connect host = "sftp.proveedor.com" username = "zoan" password = = credential("sftp")
└─ body:
SFTP Upload localPath = = rutaLocal remotePath = "/entrada/factura.xml"

SFTP supports two ways to authenticate (choose one in SFTP Connect):

MethodHow
PasswordParameter password with a credential= credential("sftp").
Private keyParameter privateKeyPath with the path to your key (.pem / OpenSSH), and privateKeyPassphrase if it is encrypted.

Server paths use / slashes and are usually absolute: /entrada/datos.csv, /salida/reportes/. Do not confuse them with the local routes (on your machine), which go in localPath.

ActivityTypeOutputWhat it does
SFTP Connectsftp-connectZoanSftpSessionConecta al servidor SFTP
SFTP Closesftp-closeClose the connection
ActivityTypeOutputWhat it does
SFTP Uploadsftp-uploadUpload a local file to the server
SFTP Downloadsftp-downloadstringDownload a file from the server
ActivityTypeOutputWhat it does
SFTP List Directorysftp-listListLista archivos y carpetas remotas
SFTP Existssftp-existsbooleanIs there a file/folder?
SFTP Move / Renamesftp-moveMove or rename a remote file
SFTP Deletesftp-deleteDelete a remote file
SFTP Create Directorysftp-mkdirCreate a remote folder