Skip to main content Skip to footer

SFTP Upload Documentation

Version: 4.0.0

Retrieved: 2025-10-09 15:16:19


SFTP Upload

The module sends a file to a SFTP server

Settings

Name Requirements Purpose Default
Host String with length 1-128 The SFTP server to use localhost
Port Number The port to use 22
Filename Property String with length 1-256 The property containing the name of the file to send file
Remote Directory String with length 0-256 The remote directory to use. if left empty the value will be taken from 'sftpupload.directory' on the incoming message. If not set, the file will be uploaded to the default directory of the SFTP server.  
Remote File Name String with length 0-256 Used to rename the file, if left empty the value will be taken from 'sftpupload.filename' on the incoming message. If not set the old name will be used.  
Delete local file after upload Boolean If true the file will be deleted locally after a successful upload true

Credential

This module contains an option to select credentials to use in the module. All credentials supported by the module are presented in a drop-down.

Input

To be able to successfully send a file to the SFTP server the message needs to have a property matching the Filename Property setting. The value of the filename property is expected to match a path to a file located on the local disk. In addition, the remote directory and filename can optionally be set by assigning values to the sftpupload object:

"sftpupload": {
    "directory": "temp",
    "filename": "somefile.txt"
}

Output

Output is the same as input

Example - Upload file to SFTP server

# Settings:
Host="localhost"
Port=22
Remote Directory="upload"
Filename Property="file"
Delete local file after upload=true

# Incoming message:
{
    file: "example.txt"
}

# Stream sent to SFTP is the content of:
"example.txt"

Example - Upload file to SFTP server

# Settings:
Host="localhost"
Port=22
Remote Directory="upload"
Filename Property="file"
Delete local file after upload=true

# Incoming message:
{
    file: "example.txt"
}

# Stream sent to SFTP is the content of:
"example.txt"

Example - Upload file to SFTP server and rename

# Settings:
Host="localhost"
Port=22
Remote Directory="upload"
Remote File Name="latest.txt"
Filename Property="file"
Delete local file after upload=true

# Incoming message:
{
    file: "example.txt"
}

# Stream sent to SFTP is the content of:
"example.txt" but is saved as "latest.txt"