> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fyno.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fyno.io/docs/_mcp/server.

# Dynamic Content

> Learn how to use placeholders, system variables, Handlebars, and components to create personalized and reusable content across Fyno templates.

Dynamic content lets you personalize your notifications with data that changes for each recipient. The left panel of the template editor has four sources of dynamic content.

| Source                                | Use it to                                                                                                 |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [Placeholders](#placeholders)         | Insert values from the `data` payload you send when you trigger a notification.                           |
| [Handlebars](#handlebars)             | Transform values and add logic, such as conditions, loops, and date or number formatting.                 |
| [System Variables](#system-variables) | Insert values Fyno already has, such as digest data, user properties, subscription links and Verify OTPs. |
| [Components](#components)             | Reuse building blocks, such as headers, footers and PDF attachments, across templates.                    |

## Placeholders

Placeholders are replaced with the dynamic data sent in the `data` payload. Placeholders are denoted by `{{ }}`.

![](/docs/_fern-img/ff1c783a7a73891ac4a91c73ecb207f7862e0eb35033b997d734a7c505a17b6d.webp)

#### Open the placeholder editor

Click **+** or **Add** next to **Placeholders** in the left panel. The **Template Placeholders** pop-up opens.

#### Add keys and sample values

In the **Form** tab, enter a **Key** and a **Sample value** for each placeholder. Click **Add Key** for more rows, or use the delete icon to remove one. Use **Search Key** to find a placeholder.

![](/docs/_fern-img/a84c5b788fbc379b14ec9ed9dd6ca4905881d0da46e65c657079b3de9456f6e2.webp)

You can also switch to the **JSON** tab and enter all the keys and sample values as JSON.

![](/docs/_fern-img/b9f3d52c5a86c2071e76c5450f4d041721be575584a18eca59019095d742df81.webp)

#### Save

Click **Done** to save, **Cancel** to discard your changes, or **Reset** to start over. Sample values are only used for the preview and for test sends.

#### Use the placeholder in your content

Type the key inside double curly braces wherever you need it, for example `Hi {{name}}`.

> **Placeholders are detected automatically**
>
> When you add a placeholder in your content using `{{ }}` and open the placeholder editor, Fyno shows **New placeholders detected. Add them here?** Click **Yes** to add them automatically.

> **Info**
>
> To shorten and track URLs in your placeholders, click **Configure** on the **Shorten and track URLs with Fyno Shorty** banner. See [Fyno Shorty](./url-shortener).

## Handlebars

Handlebars is a JavaScript library for creating dynamic templates. Handlebars in Fyno support conditional operations, loops, date and time formatting, partial searches and custom helpers.

![](/docs/_fern-img/dc1001007511cfb72ae9afc11c88ae33ef4cfc4bffeded59cdc481059c3bf91a.webp)

See [Handlebars](./templates-handlebars) for the helpers, with examples.

### Build Your Own

Under **Build Your Own**, you can create dynamic logic with custom conditions and loops in two ways:

* **Generate with Fyno AI:** Click **Generate** and describe what you need. See [Generate Handlebars with Fyno AI](./templates-handlebars#generate-handlebars-with-fyno-ai).
* **Handlebars Builder:** Click **Handlebars Builder** to build the logic visually with blocks. See [Handlebars Builder](./templates-handlebars#handlebars-builder).

![](/docs/_fern-img/da998769e8d08ab0686a4f83270762bec20993d8d601cb058244922d3d754af0.webp)

## System Variables

System Variables are pre-defined values in Fyno, so you don't need to send them in your payload. There are four groups.

![](/docs/_fern-img/36731655e82d71d624df39722b615f42e105945f12d1d7da7077bbbb916a2d52.webp)

#### Digest

If you use the **Digest** action in your workflow, three variables are available:

| Variable  | What it gives you                          |
| --------- | ------------------------------------------ |
| **head**  | The top 5 payloads in the digest.          |
| **tail**  | The bottom 5 payloads in the digest.       |
| **count** | The total count of payloads in the digest. |

Learn more in [Creating a workflow with Digest](./creating-a-workflow-with-digest).

#### User Properties

If you use Fyno's user profiles, all the user properties linked to a user profile are listed here. Learn how to create user properties in [Adding a new user property](./adding-new-user-property).

To use a user property, add it in this format:

| Property type     | Format                  | Example                  |
| ----------------- | ----------------------- | ------------------------ |
| Built-in property | `{{$user.$<property>}}` | `{{$user.$name}}`        |
| Custom property   | `{{$user.<property>}}`  | `{{$user.loyalty_tier}}` |

#### Subscription

Use these variables to let users opt in, opt out or unsubscribe from your notifications.

| Variable           | Use it to                                                                                                      |
| ------------------ | -------------------------------------------------------------------------------------------------------------- |
| **Opt-in/Opt-out** | Add to the button payload in WhatsApp templates, so users can opt in to or out of your WhatsApp notifications. |
| **Unsubscribe**    | Add a clickable unsubscribe link to your notification, usually in the footer of email templates.               |

#### Verify

[Fyno Verify](./fyno-verify-otp-link) is a fully managed API for multichannel user verification by OTP or link. To set it up, click **Configure** under **Verify**.

![](/docs/_fern-img/19bcdee716b58c2d42504fd8ecd8f472f27353cc4ef25a323659353547df503e.webp)

| Variable | Use it to                                              |
| -------- | ------------------------------------------------------ |
| **OTP**  | Generate and verify an OTP.                            |
| **Link** | Verify an email address or mobile number using a link. |

## Components

Components are modular, reusable elements, such as headers, footers and PDF attachments. Create them once, then add them to any template. Click **+** next to **Components** to create one, or select an existing one to insert it.

![](/docs/_fern-img/f582cc876e52b600b53fd9baaa599ab696dd184214e4fc4314f89fd6b350702e.webp)

> **Info**
>
> Components are currently available only for email templates.

Learn more in [Components](./components).