Back to blog

How to Watch a Folder for New Files with Zapier

Detect new files on SFTP/FTP/S3 automatically with PushFTP watched folders and Zapier triggers.

·5 min read

Why Watch Folders?

Files land on servers all the time — client uploads, automated exports, data feeds. The question is: what happens next? Manually checking a folder is tedious and error-prone. With PushFTP's watched folders and Zapier's trigger system, you can automate the response.

PushFTP polls your SFTP, FTP, or S3 server from a fixed IP address and fires a Zapier trigger the moment a new file appears. No webhooks to configure on the server side. No custom scripts. Just point PushFTP at a folder and tell Zapier what to do.

What You Need

  • A PushFTP account with a configured connection (get started here)
  • A Zapier account
  • A folder on your server where files arrive

Step 1: Create a Watched Folder in PushFTP

Log into PushFTP and go to Connections. Select the connection you want to monitor.

Under Watched Folders, click Add Folder and specify:

Path: /incoming/invoices
Poll Interval: 5 minutes

PushFTP will check this folder at the interval you set. When it finds a file that wasn't there before, it records the event and makes it available to Zapier.

You can watch multiple folders on the same connection. Each one polls independently.

Step 2: Set Up the Zapier Trigger

In Zapier, create a new Zap. For the trigger:

  1. Search for PushFTP
  2. Select New File Detected
  3. Connect your PushFTP account (use your API key)
  4. Choose the connection and watched folder

Zapier will pull in a sample file event so you can see the data structure:

{
  "filename": "invoice-2025-001.pdf",
  "path": "/incoming/invoices/invoice-2025-001.pdf",
  "size": 245760,
  "modified": "2025-01-15T10:30:00Z",
  "connection_id": "conn_abc123"
}

You get the filename, full path, file size, and modification timestamp. Use these fields in subsequent Zap steps.

Step 3: Build the Workflow

Here are three common patterns for what to do when a new file is detected:

Pattern A: Download and Forward

Trigger: PushFTP → New File Detected
Action 1: PushFTP → Download File (get the file content)
Action 2: Gmail → Send Email (attach the file)

Pattern B: Process and Move

Trigger: PushFTP → New File Detected
Action 1: PushFTP → Read File (parse CSV/JSON content)
Action 2: Google Sheets → Create Row (add data)
Action 3: PushFTP → Move File (move to /processed/)

Pattern C: Notify and Log

Trigger: PushFTP → New File Detected
Action 1: PushFTP → Download File
Action 2: Zapier → Webhook (POST to your backend)

The point is: the trigger gives you the file event, and you chain whatever actions make sense for your workflow.

Step 4: Test It

Drop a test file into the watched folder on your server:

echo "test" | sftp user@yourserver:/incoming/invoices/test-file.txt

Wait for the next poll cycle (up to 5 minutes, depending on your interval). Zapier should pick up the event and run your Zap.

Check the Zap history in Zapier and the transfer logs in PushFTP to verify everything fired correctly.

Tuning Poll Intervals

The poll interval controls how quickly PushFTP detects new files:

  • 1 minute — near real-time, uses more of your transfer quota on the free plan
  • 5 minutes — good default for most workflows
  • 15 minutes — fine for batch processing or non-urgent files
  • 60 minutes — for low-volume folders

The poll itself counts as a transfer on the free plan (50/month). If you're watching 3 folders every 5 minutes, that's ~26,000 polls per month — you'll want the Starter plan at minimum for unlimited transfers.

On paid plans, poll frequency doesn't matter from a quota perspective. Set it as aggressive as you need.

Handling Duplicates

PushFTP tracks which files it has already reported. A file won't trigger twice unless it's deleted and re-uploaded. If you overwrite a file with the same name, PushFTP detects the change and fires a new event based on the modification timestamp.

If your workflow is sensitive to duplicates, add a filter step in Zapier that checks the filename against a Google Sheet or database before processing.

Watching Multiple Folders

You can set up as many watched folders as you need per connection. Common setups:

  • /incoming/invoices — process financial documents
  • /incoming/orders — handle new orders
  • /uploads/images — resize and forward media
  • /exports/reports — distribute generated reports

Each folder gets its own trigger in Zapier, so you can build different workflows per folder. See the Zapier docs for how to configure multiple triggers.

Watched folders turn your SFTP server into an event source. Files arrive, Zapier reacts, and your workflow handles the rest — no polling scripts, no cron jobs, no manual checking. Set up your first watched folder in under a minute on the free plan.

FAQ

How fast does PushFTP detect new files?

It depends on your poll interval. The fastest is 1 minute. PushFTP polls from its static IP, checks for new or modified files, and fires the trigger. Total detection time is your poll interval plus a few seconds for processing.

Can I watch folders on S3 buckets?

Yes. PushFTP supports watched folders on SFTP, FTP, and S3 connections. For S3, specify the prefix (folder path) you want to monitor.

What happens if a file appears and disappears before the next poll?

PushFTP won't detect it. Polling is snapshot-based — it compares the current directory listing to the previous one. If a file exists during a poll, it gets detected. If it's gone before the poll runs, it's missed.

Does the watched folder trigger work with subdirectories?

PushFTP watches the specific folder you configure, not subdirectories recursively. If you need to monitor nested folders, add each one as a separate watched folder.

What Comes Next

Watched folders are the starting point for event-driven file automation. Once you're detecting new files, you can chain any PushFTP action — download, read, move, delete — to build complete file processing pipelines. The trigger handles the "when," and your Zap handles the "what."

Ready to automate your file transfers?

Connect to any SFTP, FTP, or S3 server from a fixed IP address. Free plan available — no credit card required.