- Docs
- Automations
- Automation Types
- Import Files
Import Files
The Import Files automation retrieves files from one or more external URLs or API endpoints and saves them to specified destination paths within Files.com. It provides a reliable, fully integrated alternative to custom scripts, third-party connectors, or Remote Server mounts, offering a simpler way to import files from trusted sources.
This automation supports both public and authenticated endpoints and is ideal for regularly importing data from partners, vendors, internal, or external systems. It enables dynamic file naming, supports headers and payloads, handles retries automatically, and logs each run for full visibility. Whether you are replacing a scripted job or modernizing how you connect to external services, Import Files simplifies the process of bringing external content into your Files.com environment.
When to Use Import Files Automation
Use the Import Files automation to replace custom scripts that are difficult to maintain, debug, or scale. Scripts used for fetching files over HTTP often require specialized knowledge and can be error-prone. This automation eliminates that complexity by providing built-in reliability, retry logic, logging, and dynamic token support, all managed directly within Files.com.
It’s also a smart replacement for third-party HTTP connectors or Remote Servers used to access API endpoints. Import Files integrates this functionality natively, removing the need for persistent connections, external workflow tools, or middleware. This simplifies your setup, reduces dependencies, and improves long-term stability.
Import Files is ideal for recurring B2B workflows such as importing pricing or inventory updates, retrieving daily transaction summaries, downloading regulatory reports, or fetching files from vendor portals. By consolidating these imports into a managed, automated system, you reduce manual effort, improve reliability, and speed up integration with external systems.
External URLs
Each import entry requires a valid external URL that Files.com can access directly. These URLs can point to static files hosted on public servers or to dynamic content returned from an API. You can include as many external URLs as needed in a single automation, and each entry is handled independently.
File Name to Save Response
For each external URL, you must define a file name for the downloaded content. This file name can be static or dynamic. Dynamic file names may include tokens such as %Y
, %m
, %d
, or %tp
to reflect current date and time, or values related to file triggers if the automation is event-based.
HTTP Method and Headers
You can configure the HTTP method used to fetch each file. The default method is GET
, but POST
is also supported when you need to include a body payload.
You can include custom headers for authentication, API tokens, or other request metadata. Headers support wildcard tokens and will be evaluated at runtime to include dynamic values such as current date, time, or triggering file information.
POST Body Content
When POST
is selected, you can optionally include a request body using either String or JSON format.
When using String, all wildcard tokens are expanded and inserted into the request as plain text.
When using JSON, only top-level values are expanded. For example, in { "name": "%tp" }
, the %tp
token is expanded and JSON-escaped properly. In contrast, [ "%tp" ]
or { "file": { "name": "%tp" } }
will be sent without token replacement because the value is nested or part of an array.
This selective expansion allows you to control how much of the payload is dynamic while keeping structured API formats intact. Arrays and nested structures are preserved as-is, which is useful when working with rigid schemas or third-party endpoints.
Destination Folder
Imported files are saved to one or more destination paths defined in the automation. The destination can be a folder on the same site, a Remote Server, or a connected Child Site.
If the destination path ends with a /
, the configured file name is preserved, and the file is saved into that folder. If the path does not end with a /
, the final segment is treated as the file name, and the file will be renamed accordingly.
Destination paths also support tokens such as %Y
, %m
, %d
, and %tp
, allowing you to dynamically organize imported files into dated folders or structured subdirectories based on runtime values.
Controlling How Move Files Automations Are Executed
When triggered by file actions or webhooks, Import Files automations may run in parallel if multiple events occur close together. This improves performance but can cause issues when working with remote mounts. Enable the Always Serialize Jobs setting to run each automation one at a time. This helps prevent file conflicts or race conditions on remote systems.