> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/user-documentation/working-with-documents-and-reports/creating-a-document-from-a-template.md).

# Creating a Document from a Template

This lesson will show you how to create a document from a template on AgileCase.

{% stepper %}
{% step %}

### Go to Docs & Comms tab

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

To create a document, first go to the Docs & Comms tab, then select "Docs" on the secondary toolbar. This will take you to the documents tab. On the documents tab, click "New" to create a new document.
{% endstep %}

{% step %}

### Select "Create Document"

<figure><img src="/files/gBq4he4RKboa1CAP6o5P" alt="" width="171"><figcaption></figcaption></figure>

Clicking the "New" button will trigger a dropdown menu. Select "Create Document" to continue.
{% endstep %}

{% step %}

### Select your template and fill in document description

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

To create the document, select your template from the dropdown menu. An automatic description consisting of the template name will be generated, but you can change or add to it. You are also able to label the document and create a follow-up task if necessary.

Once you have finished, click "Save Document" to create and download the document.
{% endstep %}

{% step %}

### View your populated document

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

Your document will now be produced using the template, with the merge fields filled out using data from AgileCase.

Once you have built up your library of templates, you will be able to create any standard email in this manner, allowing you to make huge time savings through all the marginal gains you will make.
{% endstep %}

{% step %}

### Your document will be listed under the Docs tab

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

After creating a document, it will be visible under the Docs tab in "Docs & Comms" so it is saved against the case and can be accessed at any time.
{% endstep %}
{% endstepper %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.agilecase.com/user-documentation/working-with-documents-and-reports/creating-a-document-from-a-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
