> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autonudge.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates

> Message content, written once, personalized per lead

Templates own the message content in Nudge. Triggers and bulk sends reference a template; the template decides the words, the language and the attachment.

<Frame>
  <img src="https://mintcdn.com/autotakt/miJuKBTUInwHcN9U/images/templates.png?fit=max&auto=format&n=miJuKBTUInwHcN9U&q=85&s=0b3747f8e9cc71145274deeab7616dc8" alt="The template library with channel and language columns" width="1600" height="1000" data-path="images/templates.png" />
</Frame>

## Variables

Write `[firstname]` and every send resolves it per lead. Built in: `[name]`, `[firstname]`, `[lastname]`, `[fullname]`, `[phone]`, and `[owner]` for the assigned rep's name. Beyond those, **any field in your registry can become a variable**: mark the field "use as variable" in Workspace setup and `[bill]` or `[rooftype]` starts resolving. List fields can map raw values to display text, so a stored `gable_roof` renders as "Gable roof" in the message.

Adjacent tokens space themselves correctly and empty values collapse cleanly, so a missing last name never leaves a double space.

## Languages

A template can hold one body per language. The rule is strict on purpose:

* **No language tabs**: the template is language-agnostic and sends to everyone.
* **With language tabs**: each contact gets the body matching their language. If no tab matches, **Nudge holds the send** rather than deliver the wrong language. A Turkish lead never gets the German version because "something is better than nothing" loses deals.

## Media

Attach an image or document from the shared asset library, or paste a public URL. On WhatsApp the body becomes the caption. Assets in use by a template are protected from deletion.

## Housekeeping

Each template tracks how often it fired and when it last fired, so the library shows you what actually gets used. A template can also **set the contact's state on send**, which is how a sent message arms the next trigger in a chain.
