> For the complete documentation index, see [llms.txt](https://docs.stacksync.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacksync.com/two-way-sync/workflows/features/variables-and-secrets/variable-replacement.md).

# Variable replacement

Variable replacement rules in module fields.

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

<table><thead><tr><th width="141.8046875">Comment on source value</th><th width="231.0703125">Source value (exact value of x)</th><th>Body to be replaced</th><th>Final result</th><th>Comment on final result</th></tr></thead><tbody><tr><td>null value</td><td>null</td><td>{{ x }}</td><td>null</td><td>null value</td></tr><tr><td>string</td><td>hello</td><td>{{ x }}</td><td>hello</td><td>string</td></tr><tr><td>json</td><td>{"y":"world"}</td><td>{{ x }}</td><td>{"y":"world"}</td><td>json</td></tr><tr><td>string</td><td>{"y":"world"}</td><td>{{ x }}</td><td>{"y":"world"}</td><td>string</td></tr><tr><td>number</td><td>123</td><td>{{ x }}</td><td>123</td><td>number</td></tr><tr><td>string</td><td>123</td><td>{{ x }}</td><td>123</td><td>string</td></tr><tr><td>empty string</td><td></td><td>{{ x }}</td><td></td><td>empty string</td></tr><tr><td>string</td><td>{{ text }}</td><td>{{ x }}</td><td>{{ text }}</td><td>string</td></tr><tr><td>null value</td><td>null</td><td>{{ x.y }}</td><td>null</td><td>null value</td></tr><tr><td>string</td><td>hello</td><td>{{ x.y }}</td><td>null</td><td>null value</td></tr><tr><td>json</td><td>{"y":"world"}</td><td>{{ x.y }}</td><td>world</td><td>string</td></tr><tr><td>empty string</td><td></td><td>{{ x.y }}</td><td>null</td><td>empty string</td></tr><tr><td>json</td><td>{"y":"world"}</td><td>{{ x.y }}</td><td>world</td><td>string</td></tr><tr><td>string</td><td>{"y":"world"}</td><td>{{ x.y }}</td><td>null</td><td>null value</td></tr><tr><td>number</td><td>123</td><td>{{ x.y }}</td><td>null</td><td>number</td></tr><tr><td>string</td><td>123</td><td>{{ x.y }}</td><td>null</td><td>string</td></tr><tr><td>json</td><td>{"y":123}</td><td>{{ x.y }}</td><td>123</td><td>number</td></tr><tr><td>json</td><td>{"y":"123"}</td><td>{{ x.y }}</td><td>123</td><td>string</td></tr><tr><td>string</td><td>{{ text }}</td><td>{{ x.y }}</td><td>{{ text }}</td><td>string</td></tr></tbody></table>

#### 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 }}`\
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 }}
```
