<!--
  Translated by the docs agent from content-src/es/guides/conocimiento-documentos/06-procedimiento-generar-un-documento-a-partir-de-una-plantilla.md
  (source_hash 51ce9aca1ce8). If that Spanish source_hash changes, re-check this translation.
-->

**Requirements:** administrator or editor role.

## Creating a new template

1. Go into **Documents**, **Templates** tab, and tap **"+ New template"**.
2. Fill in **Name** (for example, "Booking sheet"), **Type** (for example, "Letter") and **Status** (for
   example, "Draft").
3. Add, if you want, one or more **Tags** in the corresponding search box.
4. Write the **template body** on the left; use `{{variable}}` for every field you want the AI to fill in
   with data from the conversation (for example, `{{customer_name}}`). The **preview** on the right updates
   with the text and counts how many variables you've defined so far.
5. Tap **"Create template"** (or "Cancel" to discard it).

Here's how the process plays out: once you have templates created, the AI takes one of them and fills it in
with data from the conversation the document comes from (for example, the customer's name, the property
they're interested in, or the agreed dates), and the resulting document becomes available to download on
the **Generated** tab.