> 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-set-up-subject-autoformat.md). Agents can also search and read this documentation through its [MCP server](https://support.docstudio.com/~gitbook/mcp).

# How to Set Up Subject Autoformat

This document describes how to set up subject autoformat rules in a template.

### Open subject format settings

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

1. Open the **Subject** field in the template.
2. Click the **Set up subject format** ![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2Fcz2XIzFlg0HMBmxWotGM%2Fimage.png?alt=media\&token=6e02185a-7f84-4dc8-a4cc-60d79d71f078) icon.
   {% endcolumn %}

{% column width="58.33333333333333%" %}
![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FIJ2CTw9JeglulLy654fv%2Fimage.png?alt=media\&token=b428d4fb-bdfd-4ad9-9457-cbfa34811056)
{% endcolumn %}
{% endcolumns %}

### Configure subject format

{% columns %}
{% column %}

1. Add static text or select a dynamic field.
   * Repeat the action to add all required elements.
2. Arrange elements in the required subject order.
3. Click **Save**.
   {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FXQ1BvU6w15U4TtyNOnvP%2Fimage.png?alt=media&amp;token=a1981879-7751-4097-bb30-0d65fc0e5335" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

The configured elements are written to the subject in the displayed order. When an envelope is created from the template, dynamic fields are replaced with their corresponding values.

{% hint style="info" %}
You can add multiple static text elements and use special characters as separators. The combined static text must contain at **least two characters**.
{% endhint %}

### How to add static text

You can add any number of static text elements within the maximum envelope subject length and place them anywhere in the subject. Static text can contain any punctuation marks allowing you to create separators between dynamic fields.

{% columns %}
{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FhntRxX9r1TZds6j8paLj%2Fimage.png?alt=media&amp;token=f69e4f2a-32f2-4c23-a0df-b8be8f1d73c4" alt="Static text before saving"><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FQET0AKlzAO6JF6dhJWK7%2Fimage.png?alt=media&amp;token=319132db-e3f2-4318-8718-156aa64acaa4" alt="Static text after saving"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
For example, to add a comma followed by a space, enter `,` and press **Enter** or click outside the input field. DocStudio saves the entered characters as a single static text element.
{% endhint %}

### Remove subject formatting

{% columns %}
{% column %}

1. Open the subject format settings.
2. Click **Delete**.
   {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FtGP9idbtLYrFCfPrhCEI%2Fimage.png?alt=media&amp;token=19c2733b-05f2-490e-810e-ee6af13ec3cb" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Related topics

* [How to Manage Template Settings](https://support.docstudio.com/user/template-builder/template/how-to-manage-template-settings.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.docstudio.com/user/template-builder/template/how-to-set-up-subject-autoformat.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
