Skip to main content

FTP nodes

The FTP nodes allow performing operations on FTP/SFTP servers. Ecosystem offers several nodes: Send to FTP, List FTP files, Read FTP file, Delete from FTP and Move FTP file.

Parameters​

ParameterTypeRequiredDefaultDescription
AppApp❌—Application associated with the node. See Apps.
Authentication methodAuthentication method✅—FTP/SFTP identifiers and protocol used to connect.
PathString✅—Path of the file or directory targeted by the operation.
Stop the workflow on failureBoolean✅trueBoolean that determines whether the workflow stops (true, enabled by default) or continues (false) in case of failure.

Authentication methods​

Select the FTP/SFTP authentication method:

  • Host, port, username, password
  • Depending on the chosen authentication option: password associated with the entered identifier, or private key and passphrase associated with the username
  • Use an Ecosystem authentication method for security

See also: Use authentication methods in workflows.

Path​

Directory or file path:

  • Absolute: /uploads/orders
  • Relative: orders (relative to the default directory)

List FTP files​

Lists the files of a directory.

  • Path: Directory to list
  • Extensions: Filter by extension (optional)
  • Recursive: Recursive search (yes/no)
  • Name of the retrieved files variable (optional): customizable output key, default value files (accessible via context.files)
  • Stop the workflow execution on failure (required): boolean to stop or continue the workflow

Read FTP file​

Reads the content of a file.

  • Path: Full path of the file
  • Encoding: Encoding (UTF-8 by default)
  • Name of the retrieved file variable (optional): customizable output key, default value file (accessible via context.file)
  • Stop the workflow execution on failure (required): boolean to stop or continue the workflow

Send to FTP​

Sends a file to the FTP server.

  • Path: Destination path
  • Content: File content (text or base64)
  • Name: File name
  • Stop the workflow execution on failure (required): boolean to stop or continue the workflow

Delete from FTP​

Deletes a file.

  • Path: Full path of the file to delete
  • Stop the workflow execution on failure (required): boolean to stop or continue the workflow
warning

This action is irreversible.

Move FTP file​

Moves a file.

  • From: Source path
  • To: Destination path
  • Stop the workflow execution on failure (required): boolean to stop or continue the workflow

Input​

The FTP nodes receive the Path of the targeted file or directory (absolute or relative). The Send to FTP node also receives the Content (text or base64) and the Name of the file to write; the Move FTP file node receives From (source) and To (destination). Example of values received by a Send to FTP node:

{
"path": "/uploads/orders",
"name": "import_20231027.csv",
"content": "Line 1;Value A\nLine 2;Value B"
}

Output​

The List FTP files node injects the file list into context.files (or the chosen variable name):

{
"files": [
{
"name": "import_20231027.csv",
"type": "-",
"size": 10245,
"modifyTime": 1698412800000,
"accessTime": 1698412800000,
"rights": { "user": "rw", "group": "r", "other": "r" },
"owner": "ftpuser",
"group": "ftpgroup"
}
]
}
FieldDescription
nameFile name
type- for a file, d for a directory
sizeSize in bytes
modifyTime / accessTimeUnix millisecond timestamps
rightsPermissions (user, group, other)
owner / groupFile owner and group

Then access the elements via {{files[0].name}} or, in a ForEach loop, {{item.name}}.

The Read FTP file node injects the content into context.file (or the chosen variable name):

{
"file": "Line 1;Value A\nLine 2;Value B"
}

The content is a string (raw text). If the file is a valid JSON, it is automatically parsed into an object:

{
"file": {
"key": "value",
"items": [1, 2, 3]
}
}

Then use context.file in a Code node, or {{file}} in the following nodes.

For the Send to FTP, Delete from FTP and Move FTP file nodes, no context output is documented: the workflow continues after the operation.

Errors​

On operation failure, the workflow behavior is controlled by the Stop the workflow execution on failure field (true: the workflow stops, false: the workflow continues). To handle the failure cleanly, add an On Error node to the workflow.

Limits​

No documented numeric limit (size, delays) for these nodes.

Example​

List the files of a directory then read the first file:

  1. The List FTP files node lists the directory (the Path field) and injects the result into context.files.
  2. Access the files via {{files[0].name}} or, in a ForEach loop, {{item.name}}.
  3. The Read FTP file node reads the file (the Path field) and injects its content into context.file, usable via {{file}} in the following nodes or in a Code node.

See also​