Automations

How automations work

Workflows, triggers and steps, the two kinds of workflow, and how a draft becomes something that runs.

An automation is a workflow: a trigger followed by steps. The trigger decides when the workflow runs and what it starts with. Each step does one thing, such as resizing an image, adding a tag or saving a file, and passes its results on to later steps.

You'll find automations under Automations in the sidebar. Every user can create workflows for their own files, and a workflow always acts as the person who owns it.

Two kinds of workflow

When you create a workflow you choose its kind. It can't be changed later.

Library workflow

Runs on files that are already in your library: when a file is uploaded, when a tag is added, or when you start it yourself from Files. Use it to rename, tag, move, share or trash files.

Upload intake

Runs on an upload before it's saved. Steps can strip metadata, crop, resize, convert or compress the image, then a Save file step puts the result in your library. If the run fails, the upload goes to a private quarantine instead.

The parts of a workflow

PartWhat it is
TriggerThe first step. It decides which events start a run, such as File uploaded or File received, and can filter by file type, folder, tag or token.
StepOne use of a step type, with its own settings. Steps are joined by connections.
ConnectionA line from one step's output to the next step. A step with branches, like Condition, has one output per branch.
ValueA setting can be a fixed value, a value from an earlier step, or text with values in it. See Values and templates.
RunOne execution of the workflow for one file. Each run has a step-by-step history.

A workflow is a graph, not just a list: a Condition step can send files down different branches, and branches can join again later. See Conditions and branching.

Drafts, publishing and the Active switch

Each workflow has one draft, which the editor saves as you work. A draft can be incomplete or have problems, and it never runs on its own except when you test it.

  1. Publish checks the draft and saves it as a new numbered version. Publishing is refused while the Problems list shows errors.
  2. Active (the switch at the top of the editor) turns the workflow on. An active workflow always runs its latest published version.
  3. Changing the draft after publishing shows Unpublished changes. Runs keep using the published version until you publish again. Discard changes in the editor's more-actions menu resets the draft to the published version.
A run always finishes on the version it started with. Publishing a new version doesn't change runs that are already going.

What a run does

Each step runs as its own background job. That means:

  • A step that fails retries on its own (up to 3 attempts for most steps) without repeating the steps before it.
  • A slow or broken step never blocks uploads or the rest of the server.
  • Every run keeps a history you can open from the workflow's Runs tab: which steps ran, which branch each condition took, what each step produced and how long it took.

Steps that change your library are safe to repeat. If the server restarts in the middle of a run, the run picks up where it left off and a step that already saved a file or created a link doesn't do it twice.

Safety rails

  • No code. Workflows never run scripts or expressions. Values are fixed values, references to earlier steps, or text templates with simple filters.
  • No loops. A workflow never starts itself again, directly or through other workflows, and chains of workflows starting each other stop after 3 levels.
  • Your originals stay intact. A saved file's content is never changed in place. Content steps make new working copies, and only Save file stores one in your library.
  • Unprocessed uploads aren't served. In an intake workflow, the upload's links show a processing page until the workflow saves it. If it never does, the links stay unavailable and the upload goes to quarantine.

Where to go next

Your first workflow

Build a library workflow that renames and tags large images.

Compress and resize uploads

Build an intake workflow that shrinks screenshots before saving them.