FTP / SFTP · New file in a folder — When a file arrives in a folder on an FTP or SFTP server — checks a folder on a schedule. Each new file that matches starts a run, with its name, path and size — and the file itself, if you leave Download it on.

Who can do this

Workspace Admins and Editors, on every plan.

Before you start

Steps

  1. Open the workflow in the designer and open the trigger picker — Browse all triggers, or Change how it starts on an existing trigger.
  2. Select New file in a folder — FTP / SFTP. Or type SFTP in Search triggers.
  3. In Connection, choose your FTP / SFTP connection.
  4. In Folder, type the folder — /incoming. Empty is the top folder.
  5. Optional: Names like — *.csv — and Include subfolders (five levels down).
  6. Download it — on, the file comes with the run for the steps after; off, only its details.
  7. Under Checks, choose Every 5 minutes or Every 15 minutes.
  8. Open the Output tab and select Fetch a sample. The newest matching file's details come in, and Test run starts with them.
  9. Add the steps, test, then Publish.

What happens next

  • The first check after publishing only notes the newest file. Files already there never start a run.
  • Each new file starts one run, with {{ trigger.name }}, {{ trigger.path }}, {{ trigger.folder }}, {{ trigger.size }} and {{ trigger.modifiedAt }} — and, with Download it, the file.
  • Up to 100 new files start runs in one check, oldest first; the rest wait for the next check.
  • A check that finds nothing starts no run and costs nothing.

Good to know

  • Every 5 minutes is for paid plans. On Free it checks every 15 minutes whatever is chosen.
  • New means a newer modified time. A file copied in with its old time kept may not count as new; most servers set the time of arrival.
  • A file still being written can be caught half-way. If the sender writes orders.csv.tmp and renames it when done, set Names like to *.csv so only finished files match.
  • Up to 5,000 files are looked at in each check.
  • Runs start in Production and count in the month's allowance.

If something goes wrong

What you see Why What to do
Not checking since 10:45 with The server's key changed since this connection was saved. … The SFTP server shows a different key. If expected, select Test on the connection, then Check now. See When an app trigger stops checking.
Not checking with The server refused the username, password or key. … The sign-in stopped working. Reconnect, then Check now.
A file was missed It arrived with an older modified time than files already seen. Ask the sender to keep arrival times, or move processed files away.