# How to Add External Documents to a Template​

### What is an external document

An external document is a file slot in a template. A specific role uploads a file into that slot in an envelope.

Examples:

* supplier invoice
* signed scan from a third-party system
* supporting attachments

{% hint style="info" %}
By default, an envelope can contain up to **50** external and PDF documents in total. Your system admin can change this limit.
{% endhint %}

### Add an external document to a template

{% columns %}
{% column %}

1. Open the **Documents** panel.
2. Click the <img src="/files/ekbMrgh2yIWE1HFR3sA3" alt="" data-size="line"> button.
3. Select **External**.

{% hint style="info" %}
The new document appears under the first structured document. By default, it’s assigned to **Sender**.
{% endhint %}
{% endcolumn %}

{% column %}

<figure><img src="/files/DsAeCmDYAuuPhdxTQAlQ" alt="" width="170"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Configure external document properties

1. Select the external document in the template.
2. Update the document properties.

{% hint style="warning" %}
The maximum allowed size is **5 MB** per file and **25 MB** per envelope in total.
{% endhint %}

{% columns %}
{% column width="58.333333333333336%" %}
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)
  {% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="/files/V6vUuY7ByBy6CCGroPtg" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Set viewing access by role

<figure><img src="/files/K4R885R6D5m6klW0tSef" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Role that uploads documents to the envelope can not be restricted from viewing the document.
{% endhint %}

1. Open a templete in edit mode.
2. Open the **Documents** panel.
3. Click the <img src="/files/ekbMrgh2yIWE1HFR3sA3" alt="" data-size="line"> button.
4. Select **External**.
5. Click the **Document Field** to open its properties.
6. Click the **Advanced settings**.
7. Click the **Access setting** field.
8. Remove the selected checkboxes from the roles you want to restrict access.
9. Click the <img src="/files/oxDbSexJY1oBj7hMe96d" alt="" data-size="line"> button in the **Properties** of the external document.
10. Click the <img src="/files/cHTSJ6l0r13Hxu1cwsgp" alt="" data-size="line"> button in the top-right corner to update the template.

### Allowed file type groups

{% tabs %}
{% tab title="All" %}
`.pdf, .doc, .docx, .xls, .xlsx, .xlsm, .xlsb, .xml, .dbf, .txt, .rtf, .csv, .xps, .eml, .msg, .emlx, .rpmsg, .crt, .pem, .der, .cer, .ppt, .pptx, .png, .jpg, .jpeg, .tiff, .tif, .zip, .7z, .rar`
{% endtab %}

{% tab title="File" %}
`.pdf, .doc, .docx, .xls, .xlsx, .xlsm, .xlsb, .xml, .dbf, .txt, .rtf, .csv, .xps, .eml, .msg, .emlx, .rpmsg, .crt, .pem, .der, .cer, .ppt, .pptx`
{% endtab %}

{% tab title="PDF document" %}
`.pdf`
{% endtab %}

{% tab title="Image" %}
`.png, .jpg, .jpeg, .tiff, .tif`
{% endtab %}

{% tab title="Archive" %}
`.zip, .7z, .rar`
{% endtab %}
{% endtabs %}

### Add signature fields to an external document

You can place signature fields on external documents in the template.

1. Open the external document.
2. Drag a signature field from the toolbar onto the document.

{% columns %}
{% column %}

### Clone an external document

1. In the document header, click the **Context menu** ![](/files/uAUQhDjmbXg2EPu5fnnt) icon.
2. Click the <img src="/files/oEScpjogkx0tap18ujRR" alt="" data-size="line">icon.
   {% endcolumn %}

{% column %}

### Delete an external document

1. In the document header, click the **Context menu** ![](/files/uAUQhDjmbXg2EPu5fnnt) icon.
2. Click the <img src="/files/xHPbi9SCPV2ZnMd1FwfU" alt="" data-size="line"> icon.
   {% endcolumn %}
   {% endcolumns %}

{% columns %}
{% column %}

<figure><img src="/files/XbjiZQARwCriRjUHtbjW" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/RrOWBjj1BXoZUnsSxaC2" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.docstudio.com/user/template-builder/template-editor/how-to-add-external-documents-to-a-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
