> For the complete documentation index, see [llms.txt](https://guide.docmaker.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.docmaker.co/features/create-pdf-from-docx-template/build-your-docx-template/text-substitution.md).

# Text substitution

This is the most basic example. This is what your JSON data should contain :

**Data**

{% code lineNumbers="true" %}

```json
{
  "firstname": "John",
  "lastname": "Doe"
}
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="315.3333333333333"></th><th width="108" align="center"></th><th></th></tr></thead><tbody><tr><td><strong>Template</strong></td><td align="center"> </td><td><strong>Result</strong></td></tr><tr><td>Hello {firstname} {lastname} !          </td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="27a1">➡️</span></td><td>Hello John Doe!</td></tr></tbody></table>

&#x20;In your template, the tags between curly braces will be replaced by the data you provided


---

# 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:

```
GET https://guide.docmaker.co/features/create-pdf-from-docx-template/build-your-docx-template/text-substitution.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.
