# create-text-from-template

## Description

<mark style="color:purple;">`create-text-from-template`</mark> *adaptor creates a dynamic text using a* [*Mustache*](https://mustache.github.io/) *template*.

## Inputs

**`template`**\
Type: `text`\
Required: Yes\
The Mustache template text that contains any number of Mustache variable tags. Variable tags are indicated by the double mustaches that surround them, e.g. `{{ person }}` is a tag.

**`variables`**\
Type: `dictionary`\
Required: Yes\
A dictionary of variable names (dictionary keys) with values (dictionary values).

## Outputs

**`text`**\
Type: `text`\
The rendered text.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`template`: {{city}} is the only city in {{county}}, {{country}}, of which it is the county town. It had a population of {{population}} at the {{year}} census.

`variables`:

| KEY        | VALUE       |
| ---------- | ----------- |
| city       | World       |
| county     | Oxfordshire |
| country    | England     |
| population | 162,100     |
| year       | 2021        |

#### Outputs:

`text:` Oxford is the only city in Oxfordshire, England, of which it is the county town. It had a population of 162,100 at the 2021 census.

-> Created a dynamic text using the Mustache variable tags {{city}}, {{country}} {{county}}, {{population}} and {{year}}.

## Use Cases

* Build customized messages to combine with the [<mark style="color:purple;">`send-email-message`</mark>](/data-flo/reference-guide/send-email-message.md) adaptor


---

# 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://cgps.gitbook.io/data-flo/reference-guide/create-text-from-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.
