Why Create Folders Remotely?
You can't upload a file to a directory that doesn't exist. If your workflow generates dynamic paths — organized by date, client, or project — you need to create the folder first. PushFTP's Create Folder action in Zapier handles this as a simple step in your automation.
All operations run through PushFTP's fixed IP address, so your firewall rules stay the same whether you're creating folders, uploading files, or anything else.
What You Need
- A PushFTP account with a connection (sign up free)
- PushFTP's static IP whitelisted on your server
- A Zapier account
- Write permissions on the parent directory
Step 1: Decide When Folders Get Created
Folder creation usually happens right before an upload. Common triggers:
Before a dynamic upload:
Trigger: Google Forms → New Submission
Action 1: PushFTP → Create Folder (/clients/{client_name}/)
Action 2: PushFTP → Upload File to that folder
On a schedule:
Trigger: Schedule → First day of every month
Action: PushFTP → Create Folder (/archive/2025/02/)
As part of onboarding:
Trigger: CRM → New Contact Created
Action: PushFTP → Create Folder (/clients/{company_name}/)
Step 2: Add the Create Folder Action
In your Zap:
- App: PushFTP
- Event: Create Folder
- Account: Your PushFTP account
Configure:
Connection: My SFTP Server
Remote Path: /uploads/2025/01/
Or build the path dynamically:
Remote Path: /clients/{{company_name}}/invoices/
Step 3: Test It
Set the path to something like /test/new-folder/ and run the test. Then verify on your server:
ssh user@server "ls -la /test/"
You should see new-folder in the listing.
Common Workflows
Date-Based Upload Directories
Create a folder for today's date, then upload files into it:
Trigger: (any trigger that produces a file)
Action 1: Formatter → Date/Time → Format as "2025/01/15"
Action 2: PushFTP → Create Folder
Path: /uploads/{{formatted_date}}/
Action 3: PushFTP → Upload File
Path: /uploads/{{formatted_date}}/{{filename}}
This keeps uploads organized by date automatically. See the upload guide for filename template options.
Client-Specific Folders
Create a folder per client when they're added to your system:
Trigger: HubSpot → New Company
Action 1: Formatter → Text → Slugify company name
Action 2: PushFTP → Create Folder
Path: /clients/{{slugified_name}}/
Action 3: PushFTP → Create Folder
Path: /clients/{{slugified_name}}/invoices/
Action 4: PushFTP → Create Folder
Path: /clients/{{slugified_name}}/reports/
Now every client gets a pre-organized directory structure.
Monthly Archive Folders
Prepare archive folders ahead of time:
Trigger: Schedule → First of every month at midnight
Action 1: Formatter → Date/Time → Next month as "2025/02"
Action 2: PushFTP → Create Folder
Path: /archive/{{formatted_date}}/
When files need archiving during the month, the folder already exists. Check the getting started guide for connection setup details.
Handling "Folder Already Exists"
What happens if you try to create a folder that already exists? On most SFTP servers, the operation either succeeds silently or returns a non-fatal error. PushFTP handles this gracefully — your Zap won't crash.
This means it's safe to add Create Folder before every upload, even if the folder might already exist. Better to create-if-not-exists than to have an upload fail because the directory is missing.
Nested Directories
If you need to create /archive/2025/01/15/ and none of those directories exist, you may need to create each level:
Action 1: PushFTP → Create Folder → /archive/2025/
Action 2: PushFTP → Create Folder → /archive/2025/01/
Action 3: PushFTP → Create Folder → /archive/2025/01/15/
Some SFTP servers support creating nested directories in one operation (like mkdir -p). Whether this works depends on your server configuration. If in doubt, create each level explicitly.
Creating Folders on S3
S3 doesn't have real directories — folders are simulated through key prefixes. When you "create a folder" on S3, PushFTP creates a zero-byte object with a trailing slash:
Connection: My S3 Bucket
Remote Path: uploads/2025/01/
In practice, you often don't need to create S3 folders explicitly. Uploading a file with a path like uploads/2025/01/report.csv automatically creates the implied directory structure in S3. But if your downstream tools expect the folder to exist as an object, PushFTP's Create Folder handles it.
Permissions and Ownership
The folder is created with the default permissions of the SFTP/FTP user. If you need specific permissions (e.g., 755 or 775), you'll need to adjust them server-side or use PushFTP's Run SSH Command action:
Action 1: PushFTP → Create Folder → /uploads/new-dir/
Action 2: PushFTP → Run SSH Command → chmod 775 /uploads/new-dir/
See the SSH command guide for more on remote commands.
Dynamic folder creation means your workflows can organize files on the fly — by date, by client, by project. One action to create the path, the next to upload the file. Clean, automated, and predictable.
FAQ
Can I create folders on FTP servers?
Yes. Create Folder works with SFTP, FTP, and S3 connections. FTP uses the MKD command under the hood. PushFTP handles the protocol differences — your Zap looks the same regardless of connection type.
What if the parent directory doesn't exist?
Most SFTP servers require the parent directory to exist. If you try to create /a/b/c/ and /a/b/ doesn't exist, the action may fail. Create parent directories first, working from the top down.
Does creating a folder count as a transfer?
Yes. Each Create Folder operation counts as one transfer toward your monthly quota on the free plan. On paid plans, it's unlimited.
Can I create folders and set permissions in one step?
No. Folder creation and permission changes are separate operations. Use Create Folder followed by Run SSH Command to set permissions if needed.
Structure Before Content
Folder creation is the setup step that makes everything else work. Dynamic paths, date-based organization, per-client directories — they all start with creating the right folder structure. Add Create Folder as a precursor to your upload workflows, and your remote server stays organized without manual intervention.