Skip to content

Exchange files with SFTP

SFTP (SSH File Transfer Protocol) is a Mindflow integration that moves files and folders on a remote SFTP server over SSH. You can upload and download files, list directories, create or remove folders, rename or move paths, and inspect path metadata. Screenshots on this page use a sample nightly ERP export so you can see filled paths and a sample CSV.

  • A partner or legacy ERP only accepts files from an SFTP folder (for example a nightly CSV drop).
  • You pull reports, configs, or error files from a vendor SFTP inbox into a flow.
  • You archive or rename files on the server after a successful run.
  • Prefer Platform Artifacts when the payload should stay in the current Mindflow environment instead of a remote server.
  • Prefer a native cloud-storage integration (for example Amazon S3 or SharePoint) when that is the real destination.
  • Prefer Run remote commands with SSH when the job is a remote CLI or script, not file transfer.

Before you begin, you need an SFTP server you can reach on TCP port 22 and permission to create a credential in the environment. Ask your Mindflow administrator for the platform static egress IP, then allow that address inbound on the server firewall or security group. See Credentials.

Enable SFTP (Beta) in the current environment, then add its operations from the step menu.

  1. Open Integrations. In Studio, go to Integrations.

  2. Open the Mindflow vendor group. Search for sftp, then enable SFTP (Beta) if it is not already on.

    Integrations · Mindflow shows SFTP (Beta) 1.0.0 as a native integration after searching for sftp

  3. Review the operations. In a flow, open Add a step, choose Integrations, then SFTP (Beta). Confirm you see Write file, Read file, Read directory, Make directory, Move or rename path, Stat path, Resolve canonical path, Remove file, and Remove directory.

    Add a step menu for SFTP (Beta) listing write, read, list, mkdir, rename, stat, realpath, and delete operations

Every SFTP step authenticates with an SSH Password or SSH Private Key credential in the environment. Host and port come from the credential Address URL, not from the username fields.

  1. Open Environments. Open the environment that will run the flow, then choose Add credential.

  2. Choose SFTP (Beta). Set Service to SFTP (Beta). Set Credential name, and keep URL as Custom.

Then choose the authentication flavor:

Use SSH Password when the server authenticates with a username and password. Fill Address, User name, and Password.

Credential form for SFTP (Beta): SSH Password, address sftp://files.partner-erp.example, user name mindflow-export

Upload file bytes to a remote path. Use this to drop a file into a partner inbox.

  1. Open Settings on the write step. Select the SSH credential.

    Write a file Settings: Credential set to Partner ERP SFTP on Export nightly orders to ERP

  2. Open Input on the write step. Set the remote path, body, and overwrite option.

    Write a file Input: remote path /inbox/erp/orders-to-invoice.csv, sample orders CSV body, Overwrite on

  3. Set the remote path. Absolute POSIX paths with a leading / are accepted. Maximum length is 2048 characters. Do not use ? or # in the path. The path must be a regular file, not a directory or /.

  4. Paste or map the body. Maximum decoded size is 6 MB. Map bytes from a previous step, or paste a small test file such as:

    Binary file body
    orderId,customer,amount
    1001,acme,249.00
    1002,globex,81.50
  5. Optional: set Overwrite. Leave it on (default) to create or replace the file. Turn it off when the path must be new; an existing file then fails.

Download a remote file’s bytes into the flow. Use this to pull a report, config, or error file from a vendor inbox.

  1. Add Read file. Select the same SSH credential, then set the remote path of a regular file.

    Read file Input: remote path /outbox/errors/orders-to-invoice.error.csv

  2. Use the body downstream. Read returns file bytes. Content type is inferred from the file name when the step does not declare one. A directory path or / fails; use Read directory to list a folder.

List entries in a remote directory, with pagination, so you can see what a drop folder contains before you read or archive files.

  1. Add Read directory. Set the remote path of an existing directory. Limit defaults to 100 (maximum 1000 per page).

    Read directory Input: remote path /inbox/erp and limit 100

  2. Paginate when the directory has more than one page. If the response includes a next cursor, pass it as cursor on the next Read directory step until no cursor remains. Directories with more than 10,000 immediate children fail before any page is returned. See Handle API pagination.

Create a remote folder before you write files into it.

  1. Add Make directory. Set the remote path of the folder to create.

    Make directory Input: remote path /inbox/erp, Recursive off, Create only on

  2. Optional: set Recursive. Leave it off (default) when every parent already exists. Turn it on to create missing parents.

  3. Optional: set Create only. Leave it on (default) so an existing path fails. Turn it off when it is acceptable that the directory already exists.

Rename or move a path after a successful drop (for example from an inbox into an archive).

  1. Add Move or rename path. Set the first Remote path (source) and the second Remote path (destination).

    Move or rename path Input: first remote path /inbox/erp/orders-to-invoice.csv, second /archive/orders-to-invoice.csv, Overwrite off

  2. Optional: set Overwrite. Leave it off (default) so an existing destination fails. Turn it on to replace an existing regular file at the destination. Overwrite cannot replace a directory.

Inspect type, size, and modified time without downloading file bytes.

  1. Add Stat path. Set the remote path to inspect.

    Stat path Input: remote path /inbox/erp/orders-to-invoice.csv with Follow symlinks on

  2. Branch on the result. Use type, size, and modified time when the server reports them. Follow symlinks is on by default (metadata describes the target). Turn it off to describe the link itself.

Turn a path that includes ., .., or a symlink into the server’s absolute path. Use this when you need the canonical location before a later write, move, or delete.

  1. Add Resolve canonical path. Set a path that may include ., .., or a symlink.

    Resolve canonical path Input: remote path /archive/./orders-to-invoice.csv

  2. Use the canonical path downstream. The step returns the server’s absolute path after resolving ., .., and symlinks. On a chrooted server, resolve / (or a relative path) to see how paths map inside the jail. This step does not return type, size, or timestamps — use Stat path for metadata.

Delete a remote file when the drop is complete or an error file is no longer needed.

  1. Add Remove file. Set the remote path of a regular file.

    Remove file Input: remote path /outbox/errors/orders-to-invoice.error.csv

  2. Treat the file as gone. Running remove again on a missing file is safe. A directory path fails; use Remove directory for folders.

Delete a remote folder when you no longer need it. Optionally delete descendants first.

  1. Add Remove directory. Set the remote path of the folder to delete.

    Remove directory Input: remote path /staging/erp with Recursive off

  2. Optional: set Recursive. Leave it off (default) so the directory must be empty. Turn it on to delete descendants first (a sequential walk; not guaranteed atomic on the server). Running remove again on a missing directory is safe.

The screenshots on this page use Export nightly orders to ERP. Create an SSH Password or SSH Private Key credential named Partner ERP SFTP for sftp://files.partner-erp.example:22 as mindflow-export. Make /inbox/erp if it does not exist, then write today’s orders-to-invoice.csv there. List /inbox/erp and stat the uploaded file. After the ERP accepts the drop, move the file to /archive/orders-to-invoice.csv (resolve /archive/./orders-to-invoice.csv when you need the canonical path). If the ERP writes /outbox/errors/orders-to-invoice.error.csv, read that file, then remove it. Remove an empty /staging/erp folder when you no longer need it.

  • Beta: SFTP (Beta) may change; confirm operation labels in Studio if a release renames them. File transfers are limited to 6 MB decoded.
  • Network: The connector connects from the platform static egress IP on TCP port 22. A connect or transfer timeout fails the step as a gateway timeout (HTTP 504) and usually means the firewall or security group does not allow that IP, or the step Timeout is too short for the transfer.
  • Private keys: Paste the full PEM, including line breaks. A key that cannot be parsed often lost those breaks in the form.
  • Size and listing: Maximum path length is 2048 characters. Directory listing is capped at 10,000 immediate children and 1000 entries per page.
  • Defaults: Overwrite defaults to on for write and off for rename. Create only defaults to on for make directory. Recursive defaults to off for make directory and for remove directory. Follow symlinks defaults to on for stat.
  • Not in this connector: Append or resume, server-side copy, chmod, glob search, or creating symlinks. Copy a file with Read file then Write file.

Related: Reach out to services · Call native integrations · Credentials · Store data with Platform Artifacts