# Placeholders and formatting

> Placeholders let an automation drop live details from the event into a message, title or webhook — so instead of a generic "A certificate is expiring" you…

Source: https://infranest.io/docs/automation-placeholders
Last updated: 2026-08-30

---

Placeholders let you pull live details from an automation's trigger — like a domain name or expiry date — straight into your messages, so alerts sound specific instead of generic. This is for anyone building or editing an automation who wants their notifications, titles or webhooks to read naturally.

## Overview

- Placeholders are written as `{{name}}` and get swapped out for real values when the automation runs.
- The **Insert value** button shows every placeholder available for the trigger you picked, along with an example of what it will contain.
- You can format placeholders with filters, and use the same names inside **Only if** conditions to control when a rule fires.
- Sensitive fields like passwords, tokens and secrets are never offered as placeholders — they're kept out on purpose.

## Insert a placeholder

1. In the step where you're writing a message, title or webhook content (for example **Body**, **Message (optional)**, or **Payload (JSON, optional)**), click **Insert value**.
2. Browse the grouped list to find what you need:
   - **Trigger data** — details the event itself carries, such as the domain name or days left. These read cleanly with no prefix.
   - The subject group (labeled by the item's type, like *Server* or *Certificate*) — every field of the thing the event is about, even fields not included in the trigger data.
   - **Organization** — your organization's name or slug.
   - **User** — the rule owner's name or email.
   - **Date & time** — the current date and time, or just today's date.
   - **Earlier values** — anything saved by a previous **Set a value** step earlier in the same automation.
3. Select the value you want. It's inserted as `{{name}}` at your cursor.

> [!NOTE]
Sensitive fields such as passwords, tokens, and secrets never appear in this list and won't resolve even if typed manually.

## Format a placeholder

1. After a placeholder name, add a filter using a pipe (`|`) to change how the value looks.
2. Common filters you can use:
   - `{{expires_at|date}}` → *Jan 15, 2026*, or `{{expires_at|date:Y-m-d}}` → *2026-01-15*
   - `{{domain|upper}}` or `{{domain|lower}}` — change the case
   - `{{note|default:—}}` — show a fallback when the value is empty
   - `{{days_left|number}}` — format a number
   - `{{message|truncate:80}}` — shorten long text
   - `{{tags|json}}` — show the raw list
3. Chain multiple filters together if needed, one after another.

> [!TIP]
Don't worry about typos in a filter name — unknown filters are simply ignored, so your message still sends.

## Use placeholders in conditions

1. Open the **Only if** section of your automation step.
2. Add a condition using the same placeholder names you'd use in a message — for example, checking that a tag on the subject **contains** a certain word, that the rule owner's email **equals** a specific address, or comparing against today's date.
3. Leave the message field blank if you'd rather InfraNest write a sensible default for you — add placeholders only when you want to phrase it yourself.

## Tips

- Use **Earlier values** to carry information from one step to a later one — save it with **Set a value**, then insert it anywhere downstream as `{{vars.yourname}}`.
- Preview how a message will look by using **Test run** or **Preview (dry run)** before saving your automation.
