Automations

Your first workflow

Build a library workflow that tags large images and files everything else away, then run it from Files.

This walkthrough builds a small library workflow that you start by hand. For each file you run it on, it checks the width: images wider than 1920 pixels get a large tag, and everything else moves to a folder called Other.

It takes a few minutes and touches every part of the editor you'll use later: the step picker, settings, values from earlier steps, branches, testing and publishing.

Want to process uploads as they arrive instead? Start with Compress and resize uploads, which builds an intake workflow.

Create the workflow

Open Automations and click New workflow. Give it a name such as Sort by size, keep the kind as Library workflow, and choose Run manually as the trigger. Click Create.

The editor opens with a single step, the trigger.

Add a Condition

Select the trigger and click the + beside it (or Add step in the toolbar). In the step picker, open Logic and choose Condition.

The new step appears to the right of the trigger and its settings open in the panel on the right.

Set the rule

A Condition continues on True when its rules match, and on False otherwise. Set up one rule:

  • Value: switch the field to From a step, then pick Current file › Width. This is the width of the file the run is about.
  • Operator: is greater than.
  • Compare with: 1920.

The step on the canvas now summarizes the rule.

Tag the large images

Select the Condition and click the + next to its True output. Choose Add tags from the Organize group, and under Tag names enter large. A tag with a name that doesn't exist yet is created the first time the step runs.

The step's File setting (under Advanced) is already the run's file, which is what you want.

Move everything else

Click the + next to the Condition's False output and choose Move to folder. Pick a folder, or leave Folder empty for All files and type Other in Subfolders to create the folder inside it.

Files that aren't images have no width, so the rule doesn't match and they take the False branch too.

Test it

Click Test at the top of the editor and choose a file. The test runs your draft on that file and shows each step's result on the canvas: which branch the Condition took, and what the tag or move step would have done.

Nothing in your library changes during a test. See Testing.

Publish and turn it on

Click Publish, then turn on the Active switch. Manual workflows only show up in Files once they're published and active.

Run it from Files

In Files, select one or more files, open More actions and choose Run automation › Sort by size. A toast confirms how many runs started, with a link to the runs.

What happened

Open the workflow's Runs tab to see one run per file. Each run shows which steps ran, which were skipped, and the values every step produced. On a wide image, the Move to folder step shows as Skipped because the run went down the True branch.

Make it run automatically

To run the same steps on every new upload instead of by hand, change the trigger: select it and click the Change trigger button in its settings (or right-click it on the canvas), then pick File uploaded. You can limit it to some file types (for example image/*) or one folder. Publish again to apply the change.

File uploaded runs right after a file is saved, which can be before its thumbnail and dimensions are worked out. If a rule depends on width or height, test it on a fresh upload first. To change uploads before they're saved, use an intake workflow instead.