Skip to content

FTP

The FTP action exchanges files with a server: it uploads files from this PC, downloads them, lists them or deletes them. It speaks three protocols:

Protocol Port Encryption
SFTP (default) 22 SSH; sign-in with password and/or key file
FTPS 21 (ImplicitTls: 990) TLS. A server without TLS is an error; RUNOS never falls back to plain FTP.
FTP 21 none: password and files travel in plain text

What the action does to keep transfers reliable:

  • Every transfer is checked by size. After an upload RUNOS compares the server’s file size with the local one; a download must arrive with the size the server reported. If the sizes differ, that file counts as an error. A server that does not report sizes is trusted.
  • Downloads are written under a temporary name (name.part) and only renamed once complete and checked. A file trigger watching the folder never sees half a file.
  • Move deletes the source only after the check. If the source cannot be deleted, the file has still arrived: that is a warning, not an error, and the file is transferred again next time.
  • One file failing does not stop the others. At the end, the action fails if one file failed or the connection or sign-in failed. As with any action, the run then ends or the workflow’s error handling takes over (for example three retries with RetryThenNotify).
  • Missing folders on the destination side are created.

In the workflow editor you put the action together in a form and try it with Test step.

{
"Type": "FTP",
"Name": "SendInvoice",
"Parameters": {
"Protocol": "SFTP",
"Server": "sftp.partner.com",
"User": "{{connector.Partner.Username}}",
"Password": "{{connector.Partner.Password}}",
"Fingerprint": "SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og",
"Operation": "Upload",
"Source": "{{FilePath}}",
"Destination": "/inbox/invoices"
}
}
Parameter Default Meaning
Protocol SFTP SFTP, FTPS or FTP. If it is empty and Server is a URL, the URL’s scheme decides.
Server – Host (sftp.example.com), host with port (sftp.example.com:2222) or URL (sftp://…, ftps://…, ftp://…)
Port 0 0 = the protocol’s usual port (22, 21, or 990 with ImplicitTls). Wins over a port in the URL.
User, Password – Sign-in. FTP/FTPS without User signs in anonymously.
PrivateKeyFile, PrivateKeyPassphrase – SFTP: key file (OpenSSH or PuTTY format) instead of or in addition to the password
Fingerprint – Accept only this server, see Fingerprint
ImplicitTls false FTPS: TLS from the first byte (port 990) instead of AUTH TLS (port 21)
PassiveMode true FTP/FTPS: passive mode. Only set false if the server requires active mode.
IgnoreCertificateErrors false FTPS: also accept a certificate Windows does not trust (self-signed). Better: Fingerprint.
Timeout 60 Seconds for connecting and for every server reply
Parameter Default Meaning
Operation Upload Upload, Download, List or Delete
Source – What is transferred, listed or deleted, see below
Destination – Upload: folder on the server (empty = login folder). Download: folder on this PC (required).
Filter * When Source is a folder: only these files, e.g. *.pdf;*.xml
Recursive false Include subfolders; their structure is kept at the destination
IfExists Overwrite The target file already exists: Overwrite, Skip (counts as Skipped) or Error (counts as an error)
Move false Upload/Download: delete the source after a checked transfer
NewName – Upload/Download: name of the file at the destination. Takes %filename%, %filenamewithoutextension%, %extension% (of each file) and %yyyy%, %MM%, %dd%, %HH%, %mm%, %ss%.

Source is, depending on Operation:

  • Upload: one or more paths on this PC, separated by ;: a file ({{FilePath}}), a folder (its files matching Filter) or a pattern such as C:\Export\*.xml. A file or folder that does not exist is an error.
  • Download, List, Delete: a path on the server: a file (/outbox/order.xml), a folder (/outbox, its files matching Filter) or a pattern (/outbox/*.xml). A file or folder that does not exist is an error; a pattern that matches nothing is not. A path without a leading / starts in the login folder.

Delete deletes files only, never folders, and needs a Source. List lists the files (with Recursive those of the subfolders too).

Placeholders in paths: {{FilePath}}, {{InitialData…}}, connectors and %yyyy%, %MM%, %dd% (for example /archive/%yyyy%/%MM%) are replaced before the transfer.

Without Fingerprint, the action accepts any SFTP server answering at the address, and any FTPS server whose certificate Windows trusts. With Fingerprint, it accepts only that one server and refuses any other before signing in, so the password never reaches a wrong server.

  • SFTP: the host key as ssh, WinSCP or FileZilla show it: SHA256:ohD8VZ… (the older MD5 form aa:bb:cc:… works too).
  • FTPS: the certificate’s SHA-256 or SHA-1 hash in hex (with or without colons). A pinned certificate is accepted even if it is self-signed.

The result shows the fingerprint: every run and every test writes it to Meta.Fingerprint. So test the action once without Fingerprint (Test step in the test view, e.g. with the List operation) and enter the value from the output in the form under Server fingerprint. If the server’s key changes (new server, new certificate), the action fails with a message saying so; update Fingerprint then.

"Response": {
"Results": [
{
"Source": "C:\\RUNOS\\Spooler\\…\\RE-2026-0001.xml",
"Destination": "/inbox/invoices/RE-2026-0001.xml",
"Size": 18342,
"Status": "OK",
"Message": ""
}
],
"SuccessCount": 1,
"SkippedCount": 0,
"ErrorCount": 0
},
"Meta": {
"Host": "PC-01",
"Protocol": "SFTP",
"Server": "sftp.partner.com:22",
"Fingerprint": "SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og"
}

Status is OK, Skipped (already exists, IfExists: Skip) or Error with the reason in Message. List returns the files in Files instead, each with Name, Path, Size (bytes, -1 if unknown) and Modified. A following action reads them as {{ListFiles.Response.Files}}, for example in a Loop.

In the diagram of the workflow editor the action has a form (in the settings panel and in the middle column of the test view):

  • Server: Protocol SFTP, FTPS or FTP; Server, Port (22, 21 or 990), user and password. For SFTP Private key file and Key passphrase; for SFTP and FTPS Server fingerprint (test once without it: the result shows it under Meta.Fingerprint, see Fingerprint); for FTPS Implicit TLS (port 990) and accepting any certificate; for FTP and FTPS Passive mode (on by default).
  • Files: Operation Upload, Download, List or Delete; source (Local files for an upload, otherwise Path on the server), destination (upload and download only), filter and subfolders. For upload and download also what happens to an existing file (overwrite, skip, fail), Move (delete the source) (the source is deleted only after the checked transfer), a new name with %filename% etc. and the time limit (default 60 seconds).

Every field also takes {{…}} placeholders and values you drag in from the Input column of the test view; lists, switches and number fields become a text field when given a {{…}}. Parameters the form does not know are kept under Other parameters. Test step runs the action once, right away, with the data of the earlier steps, and shows the result with errors and warnings. The test really transfers or deletes. With the List operation the output shows what is on the server under Response.Files.

Send each invoice to the partner. A file trigger takes every XRechnung from the export folder and uploads it to the partner’s SFTP server, into a folder per month. Three retries on network problems:

{
"Name": "Invoices to partner",
"Autostart": true,
"Trigger": { "Type": "File", "Name": "Export", "Parameters": { "Pool": "C:\\Export\\XRechnung", "Filter": "*.xml" } },
"Actions": [
{
"Type": "FTP",
"Name": "Upload",
"OnErrorPolicy": { "Strategy": "RetryThenNotify", "MaxRetries": 3, "InitialDelaySeconds": 10 },
"Parameters": {
"Server": "{{connector.Partner.BaseUrl}}",
"User": "{{connector.Partner.Username}}",
"Password": "{{connector.Partner.Password}}",
"Fingerprint": "SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og",
"Operation": "Upload",
"Source": "{{FilePath}}",
"Destination": "/inbox/%yyyy%-%MM%",
"IfExists": "Error"
}
}
]
}

Fetch orders every 15 minutes. Download all new XML files from the partner’s outbox and remove them there (Move), into a folder that another workflow watches. Because downloads arrive under a temporary name, that workflow only ever sees complete files:

{
"Name": "Fetch orders",
"Autostart": true,
"Trigger": { "Type": "Time", "Name": "Every15Min", "Parameters": { "CronExpression": "0 0/15 * * * ?" } },
"Actions": [
{
"Type": "FTP",
"Name": "Fetch",
"Parameters": {
"Protocol": "FTPS",
"Server": "ftp.partner.com",
"User": "{{connector.PartnerFtp.Username}}",
"Password": "{{connector.PartnerFtp.Password}}",
"Operation": "Download",
"Source": "/outbox/*.xml",
"Destination": "C:\\Import\\Orders",
"Move": true
}
}
]
}