# Variable Replacement

Variables in module input fields are replaced following the standard Jinja templating rules, here are some examples:

Comment on source valueSource value (exact value of x)Body to be replacedFinal resultComment on final result

| Comment on source value | Source value (exact value of x) | Body to be replaced | Final result  | Comment on final result |
| ----------------------- | ------------------------------- | ------------------- | ------------- | ----------------------- |
| null value              | null                            | {{ x }}             | null          | null value              |
| string                  | hello                           | {{ x }}             | hello         | string                  |
| json                    | {"y":"world"}                   | {{ x }}             | {"y":"world"} | json                    |
| string                  | {"y":"world"}                   | {{ x }}             | {"y":"world"} | string                  |
| number                  | 123                             | {{ x }}             | 123           | number                  |
| string                  | 123                             | {{ x }}             | 123           | string                  |
| empty string            |                                 | {{ x }}             |               | empty string            |
| string                  | {{ text }}                      | {{ x }}             | {{ text }}    | string                  |
| null value              | null                            | {{ x.y }}           | null          | null value              |
| string                  | hello                           | {{ x.y }}           | null          | null value              |
| json                    | {"y":"world"}                   | {{ x.y }}           | world         | string                  |
| empty string            |                                 | {{ x.y }}           | null          | empty string            |
| json                    | {"y":"world"}                   | {{ x.y }}           | world         | string                  |
| string                  | {"y":"world"}                   | {{ x.y }}           | null          | null value              |
| number                  | 123                             | {{ x.y }}           | null          | number                  |
| string                  | 123                             | {{ x.y }}           | null          | string                  |
| json                    | {"y":123}                       | {{ x.y }}           | 123           | number                  |
| json                    | {"y":"123"}                     | {{ x.y }}           | 123           | string                  |
| string                  | {{ text }}                      | {{ x.y }}           | {{ text }}    | string                  |

**Not replacing sections enclosed in double curly brackets**

Use cases require to have a text between curly brackets NOT replaced by the templating engine.

An example body not to be replaced is `{{ customer text that should remain in curly brackets }}`&#x20;

In this case, the text not to be replaced can be formatted as follows to maintain the curly brackets

```
 {{ {{ customer text that should remain in curly brackets }} }}
```

where the final result would be in the final body (after replacement) is

```
{{ customer text that should remain in curly brackets }}
```


---

# 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://docs.stacksync.com/workflow-automation/features/variables-and-secrets/variable-replacement.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.
