Skip to main content

Import Files

The Import Files automation retrieves files from one or more external URLs or API endpoints and saves them to destination paths within Files.com. It is a fully integrated alternative to custom scripts, third-party connectors, or Remote Server mounts.

This automation works with both public and authenticated endpoints. It supports dynamic file naming, custom headers and payloads, automatic retries, and per-run logging. Use it to import data from partners, vendors, or other external systems on a recurring schedule.

When to Use Import Files Automation

Use the Import Files automation to replace custom scripts that are difficult to maintain, debug, or scale. Scripts that fetch files over HTTP often require specialized knowledge and can be error-prone. The automation handles reliability, retry logic, logging, and dynamic token support natively within Files.com.

It also replaces third-party HTTP connectors or Remote Servers used to access API endpoints. Import Files integrates the same functionality natively, which removes the need for persistent connections, external workflow tools, or middleware.

Common use cases include importing pricing or inventory updates, retrieving daily transaction summaries, downloading regulatory reports, and fetching files from vendor portals.

External URLs

Each import entry requires a valid external URL that Files.com can access directly. The URL can point to a static file hosted on a public server or to dynamic content returned from an API. You can include as many external URLs as you need 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. The file name can be static or dynamic. Dynamic file names may include tokens such as %Y, %m, %d, or %tp to reflect the 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. 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 are evaluated at runtime to include dynamic values such as the 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 lets you 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 is renamed accordingly.

Destination paths also support tokens such as %Y, %m, %d, and %tp, which lets you organize imported files into dated folders or structured subdirectories based on runtime values.

Controlling How Import Files Automations Are Executed

When triggered by file action based triggers or inbound webhooks, Import Files automations run in parallel when multiple events occur in close succession. This improves performance but can introduce file conflicts or race conditions when working with Remote Mounts.

Enable the Always Serialize Jobs setting to force the automation to run one job at a time. This prevents file conflicts and race conditions on remote systems.