Automation Types
There are multiple actions that automations can perform. When you select these options, your Files.com automation will execute the specified task upon being triggered.
The available actions include Create Folders, Copy Files, Move Files, Import Files, Delete Files, and Run Sync. Let's explore each of these actions in more detail below.
Create Folders
Creates folders with a name specified by the destination path. The destination may include formatting parameters to insert the date/time tokens into the destination name. You can optionally choose the time zone used for calculating the date/time tokens in destination folder names.
For example, your business files sales tax for each division in 11 states every quarter and you want to create the folders automatically where those sales tax forms and data can be collected.
For this, you can set up a Create Folder automation with Interval trigger as quarter_end
, Folder path where new subfolders will be created as/AccountingAndTax/SalesTax/State/*/
, and Subfolder names to create as %Y/Quarter-ending-%m-%d
.
Copy Files
Copies files from the selected folder path to the target folder path specified in the destination.
You can pick the wildcard pattern for file names to match from the selected source folder path. If the pattern matches, the automation will only fire on files matching the pattern. The pattern supports globbing (using wildcards to limit the matching files).
If the source path is on a remote server, then the source path does not support wildcards, and attempting to include all subfolders (with the **
pattern) or top-level subfolders (with the *
pattern) will result in an error No folder paths matched.
You can optionally select to copy all files from the selected source path or copy only the newest 'n' number of files.
By default, the Copy File automation skips copying files if an identical-sized file already exists in the destination to prevent wasteful data transfer and overages.
For example, you can create a Copy File automation with the interval trigger as 10th of every month
, folder path of files to be copied as /AccountingAndTax/SalesTax/State/*/
, pattern for file names to contain as *.pdf
and destination as %Y/Monthly-%m-%d
.
Move Files
Moves files from the selected folder path to the target folder path specified in the destination.
You can pick the wildcard pattern for file names to match from the selected source folder path. If the pattern matches, the automation will only fire on files matching the pattern. The pattern supports globbing (using wildcards to limit the matching files).
If the source path is on a remote server, then the source path does not support wildcards, and attempting to include all subfolders (with the **
pattern) or top-level subfolders (with the *
pattern) will result in an error No folder paths matched.
You can optionally select to copy all files from the selected source path or copy only the newest 'n' number of files.
For example, you can create a Move File automation with the interval trigger as whenever a new file created in the selected source folder path as AccountingAndTax/**
and destination as %Y/Year-ending-Archive/
.
Delete Files
Deletes files from the selected folder path.
You can pick the wildcard pattern for file names to match from the selected folder path. If the pattern matches, the automation will only fire on files matching the pattern. The pattern supports globbing (using wildcards to limit the matching files).
If the source path is on a remote server, then the source path does not support wildcards, and attempting to include all subfolders (with the **
pattern) or top-level subfolders (with the *
pattern) will result in an error No folder paths matched.
Import Files
Imports files from one or more external URLs and saves them under the specified destination paths.
You can retrieve or import files from any external URL or endpoint that is accessible directly by our servers. If the target endpoint requires authentication or additional parameters, headers can be used. You can add as many external URLs as needed to import files within each automation.
Each time you specify an external URL or endpoint for file import, you must also specify the file name to save the response. The file name can be either static or dynamic by incorporating wildcards, such as time-related patterns or trigger-related patterns if the automation trigger is based on file actions.
The HTTP Method setting determines how the import request is sent to the external URL or endpoint you specify. By default, these requests use the GET
method, but you can choose POST
if you need to send additional content to the external URL or endpoint. With either GET
or POST
, you can include headers, such as those for authentication, authorization, query parameters, user-agent specifications, or custom headers. Headers can include wildcards such as time-related patterns or trigger-related patterns if the automation trigger is based on file actions.
Content Body with POST Method
With the POST
method, the content body can be sent in either String or JSON format to provide any additional information required by the external endpoint. When content is supplied as a String, wildcards such as time-related patterns will be expanded and included in the request. When the content is provided as a JSON object, wildcards are expanded only for top-level values. For example, in a JSON object like { "name": "%tp" }
, the %tp
will be expanded and properly JSON-escaped. If the content instead contains an array like [ "%tp" ]
, the %tp
will be sent verbatim without replacement. Similarly, for a nested JSON structure like { "file": { "name": "%tp" } }
, the %tp
will not be replaced because it is not at the top level.
This approach provides flexibility when working with different endpoint requirements. For instance, string-based content can easily include dynamic elements with wildcard expansion, while JSON-based content allows you to control which values are expanded to match the structure expected by the external endpoint. Other JSON types, such as arrays or nested objects, are sent as-is without any wildcard expansion.
Run Sync
The Run Sync automation type is specifically designed to trigger synchronization with a remote server. This automation requires prior configuration of a Remote Server Sync.
The Run Sync automation provides the flexibility to schedule the Remote Server Syncs at various intervals such as daily, weekly, monthly, or even at a custom schedule, such as every Monday at 5PM. Additionally, it can also be triggered using an incoming webhook, allowing for even more versatility in initiating the synchronization process.
Within a single automation, you have the ability to trigger multiple Remote Server Syncs. This means that you can initiate synchronization with more than one remote server simultaneously, allowing for efficient management of multiple synchronization processes within a single automation workflow. When selecting multiple Remote Server Syncs to trigger in the same automation workflow, it is important to note that the order in which they will run cannot be predicted.
The automation process initiates the sync and will complete before the sync finishes. The outcome of the sync (whether it succeeds or fails) is independent of the automation, which only records the initiation of the sync. Even if the sync fails, the automation will still indicate success.