Automations

Automations on Files.com allow you automate workflows on your Files.com site by automatically taking an Action when a Trigger occurs.

Automations are different from Folder Behaviors (Folder Settings) because Behaviors are associated with a specific folder, while Automations apply across your entire site.

Although Automations may have a Path specified, it can be a glob (which includes wildcards), which affects multiple folders. Additionally, paths in Automations can refer to folders which don't yet exist.

Automations are never removed when folders are removed, while Behaviors are removed when the associated folder is removed.

Triggers

Automations can be triggered in the following ways:

  • Interval: Trigger the automation to run at midnight UTC based on the specified interval (Daily, Weekly, At the end of every week, Monthly, etc)

  • Custom Schedule: Trigger the automation to run at a user specified time, any day(s) of the week.

  • File Action: Trigger the automation when a file is created, read, updated, deleted, moved or copied from a selected folder.

  • Inbound Webhook: Trigger the automation will run when a request is received from another app via a webhook.

  • Realtime: Trigger the automation to run in Realtime based on defined conditions. I.e. whenever a condition becomes true, the automation will run. The Realtime trigger is currently only supported by the Request File and Request Move Automations. We plan to add support for this trigger to all Automation types. If you have a use case for the realtime trigger on an Automation that's not currently supported, please contact us and tell us more about your situation.

Future enhancements will allow Automations to be triggered by an incoming email, or by other services.

Automation Types

There are currently five types of automations:

  • Create Folder

  • Copy File

  • Delete File

  • Request File

  • Request Move

Create Folder

Creates the folder with named by destinations in the path named by path.

Destination may include formatting parameters to insert the date/time into the destination name.

Example Use case: Our business files sales tax for each division in 11 states every quarter. I want to create the folders where those sales tax forms and data will be collected.

I could create a Create Folder automation as follows:

  • Trigger: daily
  • Interval: quarter_end
  • Path: /AccountingAndTax/SalesTax/State/*/
  • Destinations: %Y/Quarter-ending-%m-%d

Delete File

Deletes the file with path matching source (wildcards allowed) in the path named by path.

Copy File

Copies files in the folder named by path to the path specified in destinations.

If the parameter source exists, the automation will only fire on files matching the source (wildcards allowed).

If the parameter limit exists, the automation will only copy the newest limit files.

Move File

Moves files in the folder named by path to the path specified in destinations.

If the parameter source exists, the automation will only fire on files matching the source (wildcards allowed).

If the parameter limit exists, the automation will only move the newest limit files.

Request File

The Request File automation requests a file (optionally from a specific user) if it does not exist.

It requests the file named in the parameter destinations in the path named by the parameter path.

If the parameter source exists, the automation will only fire if a file in that path exists.

Destinations may include formatting parameters that are backreferences to the path.

Example Use case: Continuing our Sales Tax example from above, once the folders are created for the 11 states, our Bookkeeper needs to upload a .xlsx file containing the sales records for each state.

We can create a Request File automation as follows:

  • Trigger: realtime
  • Path: /AccountingAndTax/SalesTax/State/*/*/*/
  • Destinations: SalesByState-%p3-%p2-%p1
  • Group IDs: 123 (representing the Bookkeepers group)

The %p1, %p2 and %p3 are references back into the folder hierarchy (parent 1, parent 2, etc), so that the file will be named with the state name and the quarter name in the file. Example: SalesByState-NV-2017-Quarter-ending-Dec-31.xlsx

Now, let's say that our Tax Accountant is in charge of filing the actual state tax return once the Excel doc is completed by the Bookkeeper. We can create another Automation to let him know when it's his turn to operate:

  • Trigger: realtime
  • Path: /AccountingAndTax/SalesTax/State/*/*/%/
  • Source: SalesByState-%p3-%p2-%p1
  • Destinations: StateSalesTaxReturn-Unsigned-%p3-%p2-%p1
  • Group IDs: 124 (representing the Tax Accountants group)

So the accountant will take the excel from the bookkeeper, generate the state tax return, and then upload it as a PDF, ready for the CFO to sign. How does the CFO know when to sign? You guessed it, another Automation will let him know when it's ready:

  • Trigger: realtime
  • Path: /AccountingAndTax/**/
  • Source: *-Unsigned-*
  • Destination Replace From: -Unsigned-
  • Destination Replace To: -Signed-
  • Group IDs: 125 (representing the CFO group)

This Automation looks in every nested subfolder of AcccountingAndTax (that's the /**/ in the path). And it looks for any filename containing the filename string -Unsigned-. That's the cue to the CFO that something needs his signature.

Rather than specifying the exact destination filename, we can specify a Destination Replace From and To in order to generate the new filename from the old filename.

So if StateSalesTaxReturn-Unsigned-NV-2017-q4.pdf is uploaded, this Automation will trigger and expect the file StateSalesTaxReturn-Signed-NV-2017-q4.pdf from the CFO.

You could then put in place another rule for the Tax Accountant or Bookkeeper to go do the actual filing once a signature is in place.

Request Move

The Request Move automation requests that a file be moved. This is an alternate way to implement approval workflows.

A variant of the Request File automation, this Automation creates requests that a user or group move a file, presumably indicating that they've taken some action on it.

Example Use case: Action Verb uses Files.com to collect invoices from its Contractors, who upload new invoices into their own folder structure that only they have permissions to. That structure looks like this:

  • /Accounts Payable/Contractors/[contractor]/New/
  • /Accounts Payable/Contractors/[contractor]/Paid/

The contractor has full permissions to the New/ folder, but only read-only permissions to Paid/. This allows them to upload and update new invoices, but only view invoices that are already paid. (Cool!)

But, as we grow to dozens of contractors, it becomes a tough task for Accounts Payable to check all the New folders daily.

To ensure Contractors get paid timely, we might set up Request Move automation:

  • Trigger: realtime
  • Path: /AccountsPayable/Contractors/*/New/
  • Source: *
  • Destinations: ../Paid/
  • Group IDs: 126 (representing the Accounts Payable group)

Help us build the future of Automations

Do you have an idea for something that would work well as a Files.com Automation? Let us know! We are actively improving the types of automations offered on our platform.

Get Instant Access to Files.com and Start Collaborating and Automating

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, fill out the short form on the next page, get your account activated instantly, and start setting up your Files and Workflows immediately.

Start My Free Trial