Automations

Values and templates

Fixed values, values from earlier steps, text templates, and what happens when a value is missing.

Most settings can take their value from the run instead of being typed in. A setting that can shows a mode switch with three choices.

The three modes

ModeUse it forExample
FixedA value you type or pickMax width 1920, the folder Screenshots
From a stepA value the run produced, keeping its typeThe run's file width, the content Resize produced
TextText with values placed in itScreenshot {{ trigger.content.receivedAt | date: 'yyyy-MM-dd' }}

Folders and tags are always chosen from pickers and saved by id, so renaming a folder or tag never breaks a workflow.

Content settings are always From a step: content only exists inside a run, so there's nothing to type.

Values you can use

Choosing From a step opens a tree of the values available at that point in the workflow. It only lists values from the trigger and from steps that come before this one, and only those whose type fits the setting.

GroupWhat's in it
Current fileThe file the run is about, as it is now. In a library run, this is the trigger's file. In an intake run it doesn't exist until a Save file step has saved the upload.
Previous stepsThe trigger's values, and each earlier step's outputs, nearest first.
RunThe run's id, when it started, the workflow's id, and whether it's a test.
OwnerYour user id and user name.

A value from a step that might not run (for example, one on only one branch of a Condition) is marked May be missing.

Files and content

A file value (the current file, or what Save file produced) has these fields: name, original name, extension, type (MIME type), category, size, uploaded and taken dates, width, height, folder and tags.

A content value (the upload in an intake workflow, or what a content step produced) has: name, extension, type, category, size, SHA-256, width, height, taken and received dates, and source. Its bytes are only read by steps, never shown.

Text templates

In Text mode, put values in curly braces: {{ path }}. Use Insert value to pick one from the same tree instead of typing the path. Text has no logic: no conditions or loops, just values and filters.

{{ trigger.content.receivedAt | date: 'yyyy/MM' }}
{{ trigger.file.name | lower | replace: ' ', '-' }}
{{ steps.ai.topic | default: 'Other' }}

Filters

Add filters after a |. They apply left to right.

FilterDoesExample
date: 'format'Formats a date with a .NET format string, in the workflow's time zone (UTC unless set)date: 'yyyy-MM-dd'
lower, upperChanges case
slugMakes the text safe for names and pathsMy Shot! → my-shot
truncate: nKeeps the first n characterstruncate: 40
replace: 'a', 'b'Replaces every a with breplace: '_', ' '
sizeFormats a number of bytes1.2 MB
join: ', 'Joins a list
default: 'text'Uses the text when the value is missing or nulldefault: 'Other'
optionalUses empty text when the value is missing or null

The rendered text can be up to 4 KiB.

Missing, empty and null

Tessra keeps these apart so a step never quietly does the wrong thing:

ValueMeansExample
MissingThe value doesn't exist in this runThe step that produces it was skipped, or a file has no width
NullThe value exists but has nothing in itA screenshot with no date taken
EmptyEmpty text or an empty list
0, falseReal valuesA width of 0 is a width
  • A required setting whose value is missing fails the step with input_missing, naming the value. Tessra never guesses a default for it.
  • An optional setting whose value is missing uses the step's default.
  • A template with a missing or null value fails the step, unless that placeholder uses default or optional.
  • In a Condition, comparing a missing or null value is always false. Use exists, doesn't exist, is empty (null) or is empty to test for them directly.