Values and templates
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
| Mode | Use it for | Example |
|---|---|---|
| Fixed | A value you type or pick | Max width 1920, the folder Screenshots |
| From a step | A value the run produced, keeping its type | The run's file width, the content Resize produced |
| Text | Text with values placed in it | Screenshot {{ 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.
| Group | What's in it |
|---|---|
| Current file | The 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 steps | The trigger's values, and each earlier step's outputs, nearest first. |
| Run | The run's id, when it started, the workflow's id, and whether it's a test. |
| Owner | Your 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.
| Filter | Does | Example |
|---|---|---|
date: 'format' | Formats a date with a .NET format string, in the workflow's time zone (UTC unless set) | date: 'yyyy-MM-dd' |
lower, upper | Changes case | |
slug | Makes the text safe for names and paths | My Shot! → my-shot |
truncate: n | Keeps the first n characters | truncate: 40 |
replace: 'a', 'b' | Replaces every a with b | replace: '_', ' ' |
size | Formats a number of bytes | 1.2 MB |
join: ', ' | Joins a list | |
default: 'text' | Uses the text when the value is missing or null | default: 'Other' |
optional | Uses 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:
| Value | Means | Example |
|---|---|---|
| Missing | The value doesn't exist in this run | The step that produces it was skipped, or a file has no width |
| Null | The value exists but has nothing in it | A screenshot with no date taken |
| Empty | Empty text or an empty list | |
0, false | Real values | A 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
defaultoroptional. - 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.