Skip to content

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 has a small button in front of its input that shows how the value is set; click it to switch.

The three modes

ModeUse it forExample
Fixed valueA 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
TemplateText with values placed in itScreenshot {{ trigger.content.receivedAt | date: 'yyyy-MM-dd' }}

The button only offers the modes a setting supports: numbers and folders have no template, and content is always from a step.

In a template, each value shows as a token with a short name, such as Content › Received · date. Type text around the tokens as usual.

  • Add a value: click Insert value (or + on a one-line field), or type {{ and pick from the list with the arrow keys and Enter. The token goes where the cursor is, or replaces the selected text. Typing a whole expression, such as {{ subject.name }}, also turns it into a token.
  • Remove a value: Backspace or Delete next to a token removes the whole token, never part of it. You can also hover a token and click ×.
  • See or change a value: click a token to see where it comes from, its type, its filters and its expression, and to replace it, copy its expression or remove it. Replacing keeps its filters.
  • Move values: select text with tokens in it and cut, copy and paste as usual. Copied text keeps the expressions, so pasting it into another template, or into a chat, gives {{ subject.name }} text that turns back into tokens when pasted into a template.
  • Undo: while you're typing in a template, Ctrl+Z (⌘Z) and Ctrl+Shift+Z undo and redo your edits there. Outside it, they undo changes to the workflow.

A token whose value isn't available at this step (its step was removed, or moved after this one) is shown in red, and one whose value may be missing in amber. Neither is removed or changed for you: replace or remove it. An expression Tessra can't read, such as an unknown filter, stays as it was and is shown in red too.

Editing as an expression

Choose Edit as expression from the same button to see and edit the underlying text: a template as Screenshot {{ trigger.content.receivedAt | date: 'yyyy-MM-dd' }}, and a value from a step as its path, such as steps.resize.content. This is the same value either way; switching back shows the tokens again. Tessra remembers the choice for other settings.

On a multi-line field such as a message, the mode button sits in the field's header next to two more buttons: Edit as source (</>) switches between tokens and the underlying text for that field, and Expand opens the larger editor.

The expanded editor

Expand opens the field in a large window with the values panel on the right: click a value to insert it at the cursor, or search for one. Visual shows tokens and formatting, Source shows the exact text that's saved, and Preview shows how the text will look with values as placeholders. The footer counts the characters against the setting's limit and points out problems, such as an unclosed {{ or values that aren't available at this step.

Nothing changes until you click Apply. Cancel, Escape or the close button ask before throwing away your changes.

Formatted text

Some settings are sent as Markdown, such as a notification's Message when its connection shows formatting (Discord does) and an AI step's Additional instructions. Their editor shows the formatting as you type:

  • Select text in the field to bold, italicize, strike through, mark it as code or add a link.
  • The expanded editor also has headings, bulleted and numbered lists, quotes, code blocks, and undo and redo.
  • Markdown shortcuts work as you type, such as **bold**, - for a list and > for a quote.

A link's address can be a value from the run: in the link box, click Use a value. Addresses must start with http://, https:// or mailto:, or be a value; others, such as javascript:, are refused.

The text is saved as Markdown, and opening a setting never rewrites it. If the visual editor would write some of it differently, for example + list markers as -, the field opens as source and offers Edit visually; if it uses Markdown the editor can't show, such as tables or HTML, it stays as source so nothing is lost. When the chosen connection can't show Markdown, the message is edited as plain text and a note says so: any formatting characters already in it are sent as they are, never removed.

A setting sent as JSON, such as a webhook's Body, is edited in a monospaced font, with values as tokens.

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. Fields are picked from your fields and saved by id, like folders and tags.

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.

The current file also has its fields, listed by name under fields in the tree, and its attachments (name, kind, size and when it was added). A field with no value on the file is missing, so mark the setting's fallback with | default: in text, or check it with a Condition first.

An attachment value (from Add attachment, or the current file's attachments) stands for its text: a setting that takes text, such as Add attachment's Text, accepts it from From a step and reads the text when the step runs.

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 a Template, values sit in curly braces: {{ path }}. Use Insert value or type {{ to pick one 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.