# Steps and placeholders

> What the four steps do, who a notification reaches, how actions change data, how if and else split the records, and every placeholder with the form it takes in a text.

The steps in the card <Ui>Then</Ui> do the work. They run from top to bottom, and each one sees what the steps before it produced. An automation has at most 20 steps, counting the ones inside <Ui>If / else</Ui>.

| Step | Does | Available in |
|---|---|---|
| <Ui>Notify</Ui> | puts a notification into the bell, and if you want sends an e-mail | your own and tenant automations |
| <Ui>Send mail</Ui> | sends a mail to any addresses | tenant automations |
| <Ui>Run an action</Ui> | creates or changes data, without asking | your own and tenant automations |
| <Ui>If / else</Ui> | runs different steps depending on a condition on the record | both, when the trigger delivers records |

Every step shows its number in its heading (<Ui>Step 1</Ui>, <Ui>Step 2</Ui> and so on). The arrows move it up or down, the bin removes it.

## Notify

A notification in the bell of the people you choose, with a link to the record.

**Who gets it.** Under <Ui>To</Ui>:

- the box with the name of the person it runs as, for example <Ui>Jana Brandt, who it runs as</Ui>. In your own automations it reads <Ui>me</Ui>, and it is the only recipient there is.
- <Ui>Further people</Ui>: up to 50 people of the tenant.
- <Ui>Person from the record</Ui>: a person field of the source, such as the project lead of a project. Every record notifies its own person. Only offered when the trigger delivers records and the source has a person field.

A notification names a record, so it only reaches people who may read the source. Anyone else is left out without an error, and so are deactivated people and people who have not accepted their invitation yet. The person it runs as gets it whenever that box is ticked. When nobody is left, the step still counts as done and the history says <Ui>Niemand, der die Meldung bekommen darf.</Ui> (nobody who may receive the notification).

**How it arrives.** Under <Ui>Notify by</Ui>:

| Choice | The bell | The e-mail |
|---|---|---|
| <Ui>Bell and e-mail</Ui> | right away | one mail per notification, right away |
| <Ui>Bell and digest</Ui> | right away | only if still unread after four working hours, gathered with others, at most one mail a day |
| <Ui>Bell only</Ui> | right away | none |

Each person decides whether automations may e-mail them at all, under <MenuPath to="My profile > Notifications" /> in the section <Ui>Automations</Ui>. With <Ui>E-mails from automations</Ui> switched off, the notifications still arrive in the bell, but no mail goes out, whatever the step says.

<Screenshot src={shot_email_switch} alt="The section Automations in the notification settings of the profile, with the switch E-mails from automations" caption="My profile › Notifications. The switch applies to every automation, your own and the tenant's." />

**What it says.** <Ui>Title</Ui> and <Ui>Text</Ui> take [placeholders](#placeholders). Left empty, the title is the name of the automation, followed by the name of the record when there is one, and the text says what triggered it. Those standard texts come from the server and are in German for now.

**One notification for several records.** When a run covers several records, which happens with <Ui>A condition holds</Ui> and with <Ui>On a schedule</Ui>, each person gets one notification per step and channel, not one per record. It lists the records by name, up to 10, then <Ui>… und N weitere</Ui> (and N more), and links to the automation instead of a single record. The title is yours if it is the same for every record, otherwise the name of the automation and the number of records. Record triggers start one run per record, so they notify once per record.

## Send mail

A mail through the tenant's mail server, to people who do not need an account in nexxus: the management, a supplier, an auditor. Only in tenant automations.

- <Ui>To</Ui>: up to 20 addresses, separated by commas. A placeholder may point at a mail field of the record, `{{record.email}}` for example. If that field is empty, the step does nothing and says <Ui>Keine Adresse im Datensatz, keine Mail.</Ui> (no address in the record, no mail). If it holds something that is not an address, the step fails.
- <Ui>Subject</Ui> (up to 200 characters) and <Ui>Text</Ui> (up to 20,000), both with placeholders. The text goes out as plain text with its line breaks.

The mail leaves when the whole run has succeeded. If a later step fails, it is not sent.

## Run an action

Creates or changes data with the same actions the app offers, as if the person the automation runs as clicked the button. Under <Ui>Action</Ui> the list holds every writing action that person may run, including those of installed package modules. Actions that delete or remove something are not offered, and neither are the automations themselves.

The fields below depend on the action:

- **An action that creates something** (a task, a measure, a contact) shows <Ui>Fields</Ui>. The ones it cannot do without are already there and marked <Ui>required</Ui>; <Ui>Field</Ui> adds more.
- **An action that changes something** asks under <Ui>Which record</Ui> for the number of the record to change, usually the one that triggered: `{{record.id}}`. Below, under <Ui>What should change</Ui>, you add the fields to set.

Fields with fixed values, a priority or a status, show a list to pick from. Yes or no fields offer <Ui>Yes</Ui> and <Ui>No</Ui>. Every other field takes text with placeholders. Where a field expects a number of another record, a board or a person, enter that number: it is at the end of the record's address, and the person pickers of nexxus show it in brackets, `[3] Tom Keller`.

The step runs without asking. It passes the same checks as the button in the app, with the rights of the person the automation runs as; if one fails, the step fails and the history quotes the reason. After the run the history shows what was done, for example <Ui>„Aufgabe anlegen“ ausgeführt (#4)</Ui> (create task, done, with the number of the new task). That number is available to the later steps as `{{step2.id}}`, see [Results of earlier steps](#results-of-earlier-steps).

### Automations that trigger each other

Data an action creates or changes can trigger other automations, just like a change by a person. The history of the second automation then says <Ui>triggered by run #12</Ui>. Two limits keep such chains from running away:

- An automation never triggers itself. A change made by its own run is skipped with <Ui>Von einem eigenen Lauf ausgelöst.</Ui>
- A chain ends after three automations: <Ui>Die Kette aus Automationen endet nach 3 Gliedern.</Ui>

## If / else

Sends records down different paths. The step has a condition under <Ui>If the record</Ui>, built with the same [condition builder](/automations/conditions/), and two lists of steps: <Ui>Then</Ui> for records that match, <Ui>Else</Ui> for the others. One of the two lists may stay empty and shows <Ui>nothing</Ui>.

<Screenshot src={shot_if_then} alt="Step 1 If / else with the condition Ampel is Kritisch, and below Then, step 2 Notify" caption="If the traffic light (Ampel) of the project is red (Kritisch), the steps under Then run." />

An <Ui>If / else</Ui> inside <Ui>Else</Ui> gives a third path. "Red: escalate. Otherwise, if yellow: a note. Otherwise: nothing" looks like this:

<Screenshot src={shot_if_else} alt="Under Else, step 4 If / else with the condition Ampel is Gefährdet, and below Then, step 5 Notify" caption="The second if sits in Else. Steps are numbered top to bottom across all levels: 1 is the first if, 2 and 3 its Then, 4 the second if, 5 its Then." />

- If and else need a record to look at, so they only work with <Ui>A record is created</Ui>, <Ui>A record is changed</Ui>, <Ui>A condition holds</Ui> in the mode <Ui>every record that starts to match</Ui>, and <Ui>On a schedule</Ui> with a data source. Otherwise the editor says <Ui>"If / else" only works when the trigger delivers records.</Ui>
- Up to three levels can be nested: <Ui>No more than 3 levels of if/else.</Ui>
- The condition is checked when the step is reached, for each record of the run, with the rights of the person the automation runs as.
- The history shows which way a record went: <Ui>Trifft zu: Dann</Ui> (matches: then) or <Ui>Trifft nicht zu: Sonst</Ui> (does not match: else).

## Placeholders

Placeholders put values from the record into texts and fields. Type them in double braces, or click the braces next to a field (<Ui>Insert placeholder</Ui>) and pick from the menu.

| Placeholder | In the menu | Becomes |
|---|---|---|
| `{{record.title}}` | <Ui>Record name</Ui> | the name of the record, as lists show it |
| `{{record.link}}` | <Ui>Link to the record</Ui> | the address that opens the record |
| `{{record.id}}` | <Ui>Record id</Ui> | the number of the record |
| `{{record.<field>}}` | the name of the field | the value of that field, `{{record.detectedAt}}` for example |
| `{{count}}` | <Ui>Count</Ui> | the number of matching records, only for <Ui>the count reaches a threshold</Ui> |
| `{{step2.id}}` | <Ui>Step 2: id of the result</Ui> | the number of what step 2 created, offered for every earlier <Ui>Run an action</Ui> |

The menu only lists what the trigger and the earlier steps offer. Without records there are no `{{record.…}}` placeholders, and the menu says <Ui>This trigger offers no placeholders.</Ui>

### How values look in a text

Inside a text, a value takes its readable form:

- dates as `31.12.2026`, and points in time as `31.12.2026 14:30`, in the tenant's time zone,
- fixed values with their label, `Kritisch` instead of `CRITICAL`,
- people and other linked records with their name instead of their number,
- yes or no fields as `Ja` or `Nein`.

A field that holds **nothing but one placeholder** gets the value itself instead. `{{record.id}}` alone stays a number, and `{{record.projektleitung}}` alone is the number of the project lead, which is what the fields of an action need. Write the placeholder alone in action fields that expect a number, and inside a sentence where people read it.

### Results of earlier steps

`{{step2.id}}` is the number of the record that step 2 created. Other fields of that result can be named the same way, `{{step2.<field>}}`. A typical use is a second action that refers to the first one, a comment on the task step 2 created.

A step can only use results of steps that have surely run before it: earlier steps on the same level, and steps on any level above. A step in <Ui>Else</Ui> cannot use one from <Ui>Then</Ui>, because only one of the two runs. Saving such a reference fails with <Ui>Schritt 5 verweist mit {"{{step3.id}}"} auf Schritt 3, der in einem anderen Zweig liegt und nicht sicher gelaufen ist.</Ui> (step 3 lies in another branch).

The test run creates nothing, so earlier steps have no result yet. Fields that use `{{stepN.…}}` are left out of the pre-check, and texts show the placeholder as written.

## When something goes wrong

| What you see | What it means |
|---|---|
| <Ui>A notification needs someone to receive it.</Ui> | Nobody is ticked or picked under <Ui>To</Ui>. |
| <Ui>The mail needs an address, a subject and a text.</Ui> | One of the three is empty. |
| <Ui>Schritt 2: {"{{count}}"} gibt es nur beim Auslöser „Anzahl über einer Schwelle“.</Ui> | `{{count}}` only exists in the mode <Ui>the count reaches a threshold</Ui>. |
| <Ui>Schritt 1: {"{{record.title}}"} geht nur, wenn der Auslöser Datensätze liefert.</Ui> | The trigger has no records, a schedule without a source for example, so there is nothing to insert. |
| <Ui>Schritt 2: „Beschreibung“ gibt es in „Sicherheitsvorfälle“ nicht. Es gibt: …</Ui> | The placeholder names a field the source does not have. The list after it names the ones it has. |
| <Ui>Die Aktion „…“ gibt es nicht, oder … darf sie nicht ausführen.</Ui> | The person the automation runs as may not run the action, or no longer may. |
| <Ui>No more than 20 steps.</Ui> | The limit counts the steps inside <Ui>If / else</Ui> too. |

## Next steps

<CardGrid>
  <LinkCard title="Test run and history" href="/automations/test-and-history/" description="Try the steps against real data and read what each one did." />
  <LinkCard title="Recipes" href="/automations/recipes/" description="Six automations that use these steps, ready to copy." />
</CardGrid>