> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/template-builder/template/how-to-create-and-configure-a-template.md).

# How to Create and Configure a Template

This document explains how to create and configure a template in DocStudio.

{% hint style="info" %}
See the [Glossary](/glossary/glossary.md) for DocStudio term definitions.
{% endhint %}

### Create a template

1. In the left sidebar, open **Templates**.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FvaiWO6F9xTswTgv5y1i2%2Fimage.png?alt=media&amp;token=4f5b354e-051a-4cd2-8777-471e26aa5ad5" alt="" data-size="line"> button.

The template editor opens.

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FEFtImwShz7OeajNhoItT%2Fimage.png?alt=media&amp;token=0dd8871e-fb88-47eb-85a0-3929b89fe590" alt=""><figcaption></figcaption></figure>

### Structured document

**Structured document** is the **default** document type for structured, data-driven templates. It lets you insert dynamic fields (text, number, date, choice, dictionary, lookup, etc.), build tables, apply formulas, and add signature elements.

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FvbupvUdbMIJEwfRbE1oq%2Fimage.png?alt=media&amp;token=791bf613-43f3-48e1-a4bd-62d03d8d6d21" alt="" width="563"><figcaption></figcaption></figure>

### Add external or PDF documents

{% columns %}
{% column %}
You can add external documents or PDFs to the template.

1. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2Fp5NhBNpMdyDn0fdeGkkv%2Fimage.png?alt=media&amp;token=c1100c29-aae8-4c88-a6a5-4d88373aa454" alt="" data-size="line"> button.
2. Choose the document format:\
   — External\
   — PDF document
   {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FdeoAqDT4aawH1XjhVVzK%2Fimage.png?alt=media&amp;token=e89e26fd-dfcd-448c-8373-5acce80c34ff" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
You can configure:

* role (who uploads the file)
* file name (placeholder shown before upload)
* tooltip (optional helper text)
* optionality (required vs optional)
* allowed file type group
* advanced settings (access settings for the file)

{% hint style="info" %}
To learn more, read [External Documents in Templates](/user/template-builder/template-editor/how-to-add-external-documents-to-a-template.md) or [PDF documents](/user/template-builder/template-editor/how-to-add-pdf-documents-in-a-template.md).
{% endhint %}
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2Fy4ww48cKFNrnifmrlMSg%2Fimage.png?alt=media&amp;token=bffeff4e-167b-4dfa-ace2-82600c60b229" alt="" width="235"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Fields tab

Use **Dynamic Fields** to add fields to a structured document.

See [Template Dynamic Fields](/user/template-builder/template-dynamic-fields/template-dynamic-fields-overview.md) for the full list, including:

{% columns %}
{% column width="41.66666666666667%" %}

* [Text field](/user/template-builder/template-dynamic-fields/text-field.md)
* [Number field](/user/template-builder/template-dynamic-fields/number-field.md)
* [Currency field](/user/template-builder/template-dynamic-fields/currency-field.md)
* [Number to text Field](/user/template-builder/template-dynamic-fields/number-to-text-field.md)
* [Choice field](/user/template-builder/template-dynamic-fields/choice-field.md)
* [Checkbox field](/user/template-builder/template-dynamic-fields/checkbox-field.md)
* [Dropdown field](/user/template-builder/template-dynamic-fields/dropdown-field.md)
* [Dictionary field](/user/template-builder/template-dynamic-fields/dictionary-field.md)
  {% endcolumn %}

{% column width="58.33333333333333%" %}

* [Lookup field](/user/template-builder/template-dynamic-fields/lookup-field.md)
* [File field](/user/template-builder/template-dynamic-fields/file-upload-field.md)
* [Table field](/user/template-builder/template-dynamic-fields/dynamic-table-field.md)
* [Duplicate field](/user/template-builder/template-dynamic-fields/duplicate-field.md)
* [Formula field](/user/template-builder/template-dynamic-fields/formula-field.md)
* [Autonumber field](/user/template-builder/template-dynamic-fields/autonumber-field.md)
* [QR/barcode field](/user/template-builder/template-dynamic-fields/qr-barcode-field.md)
* [Signature field](/user/template-builder/template-dynamic-fields/signature-field.md)
  {% endcolumn %}
  {% endcolumns %}

### Template settings

{% columns %}
{% column %}
Template settings are available right after creation.

Use the **Template** and **Flow** tabs.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FZw48fvXhArszkKqdXv6z%2Fimage.png?alt=media&amp;token=5e4af2ae-03df-45c0-b9f7-704d0bf0f59d" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

#### Template tab

Use **Template** for the main details and settings.

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FrSeNvK3IlUjwb0mIHYd4%2Fimage.png?alt=media&amp;token=ca19537d-6e9e-4ae9-b418-0d0cb68260e2" alt=""><figcaption></figcaption></figure>

Required fields are marked with a red asterisk (`*`). **Name** and **Description** are mandatory. By default, the template is created in **My Templates**, and access is restricted to the mailbox level. Use the **Edit** ![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F77dnyuvhQWgXzyfXbhVz%2Fimage.png?alt=media\&token=3121d6ea-4234-4631-a99f-d16254eb351c) icon to change the template’s location and access level.

#### Set the template location

In the modal, create or select a folder.

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FwiHc6sWsFF101lKuQxzZ%2Fimage.png?alt=media&amp;token=af10885c-06e7-404f-bec5-d96013a4516d" alt=""><figcaption></figcaption></figure>

#### Set the template access level

{% hint style="info" %}
All templates are accessible at the mailbox level by default.
{% endhint %}

There are three access levels. Each one has a checkbox on the left and a pencil icon on the right:

{% columns %}
{% column width="50%" %}

1. **Selected mailboxes**\
   The template is accessible only to specific mailboxes that you choose.
2. **My account**\
   The template becomes available to all mailboxes within your account.
3. **Everyone**\
   The template is accessible to anyone who has the direct link or the UUID.
   {% endcolumn %}

{% column width="50%" %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FHL9risEsc4dbY8oBHLUJ%2Fimage.png?alt=media&amp;token=fe2b0368-5e5c-4e37-ab62-1a2a5a66b6d0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Share with community**\
When enabled, the template can be shared with the community.
{% endhint %}
{% endcolumn %}
{% endcolumns %}

Once you add the template to **Favourites**, it appears in **Templates → Shared with You**.

{% hint style="info" %}
Please note that files with public access settings can be published on the Internet.
{% endhint %}

#### Envelope properties

{% columns %}
{% column width="58.333333333333336%" %}

* Subject\
  — Set up the subject format
* Message\
  — Envelope message. Visible to users in the inbox.
  {% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F0mMWjD7PhUo39KLYeVsF%2Fimage.png?alt=media&amp;token=c60af325-289f-490b-a246-59d04a9fed06" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

#### Recipient experience

{% columns %}
{% column %}
**Delegation is denied** — prevents recipients from delegating their assigned action to another user.

**Do not send files by email** — prevents DocStudio from sending envelope files by email.

**Restrict envelope archive downloading until envelope completion** — prevents users from downloading the envelope archive before the envelope is completed.

**Show metadata** — displays envelope metadata to recipients if metadata exists for the envelope.

Set expiration — set the envelope validity period.

* Non-expiring envelope: The envelope has no deadline and remains active until signed.
* **Sender will set expiration:** The sender manually sets the expiration date.
* **Set expiration:** The template creator sets the expiration period.
  {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FSnOWm0N18L5FhezMmMr9%2Fimage.png?alt=media&amp;token=96fc0e03-ae3b-4a94-a05a-5b326b02ee9f" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Flow tab

The **Flow** tab contains participant roles.

{% columns %}
{% column %}
Role types:

* **Sender:**\
  — Creates an envelope from the template and sends it.
* **Assignee:**\
  — The main recipient responsible for completing the required action (e.g., signing or filling in fields).
* **Approver:**\
  — Reviews the document and either approves or rejects it before the process continues.
* **CC (Carbon Copy):**\
  — Receives a copy of the envelope for informational purposes only. No action is required.
  {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FMNB42DtzXhVtimRhxGJ8%2Fimage.png?alt=media&amp;token=cbefa028-8b5b-42af-8b8f-412be5f22dea" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

To add a role, click the **Add participant** button.

{% columns %}
{% column %}
Fill in the role form:

* **Role name** — Enter a custom role name.
* **Let sender set** — Specify a mailbox, an email, or another role as a recipient. Leave it empty if the sender should choose later.
* **Role type** — Choose the role type.
  {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FzR1aZqhIulDE88EAgCzM%2Fimage.png?alt=media&amp;token=2d394328-defc-4c1d-aa43-c65ba9f92831" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
You can leave **Mailbox** empty. The sender selects the recipient when sending.

Use **Mailbox UUID** to pre-assign a specific mailbox.
{% endhint %}

### Finalise the template

{% columns %}
{% column %}
When you finish the setup:

1. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FefocjhgXXNw2A6hHT7zO%2Fimage.png?alt=media&amp;token=85b723c6-a62a-42a7-8af3-ef4e67cdf852" alt="" data-size="line"> button to save the template without sending.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F9ZH1wS7kaRymUqK5HUqE%2Fimage.png?alt=media&amp;token=311d71d1-18c5-45b9-9248-a8809a4fe97a" alt="" data-size="line"> button to create and send an envelope.

When you click **Send**, the template is saved automatically.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2Ft5RmQ6YHZpj0KtLwzFA2%2Fimage.png?alt=media&amp;token=d3c29684-1763-4664-8d38-fc64111602d0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can send an envelope only when all required fields are filled in.
{% endhint %}
{% endcolumn %}
{% endcolumns %}
