How to add variables to a template in Confluence
Add Confluence template variables with /variable, then configure each as Text, Multi-line Text or List.
Variables collect reusable inputs when a document is created from the template. Use them for stable facts such as product area and experiment owner; use ordinary sections for reasoning that needs a narrative.
Step-by-step guide
Open a managed template as its admin
Go to Space settings → Look and feel → Templates and select Edit beside the template. Variables belong to templates created with the new editor; placing text that looks like a token on an ordinary page will not create a template input form.
Insert and name each variable
Type /variable and press Enter. Select the token and its edit control, then name it Product area. Choose List when the input should come from agreed options, or Text for a single-line input such as experiment owner.
Use repeated names intentionally
For a brief that repeats the product area in its header and summary, insert the same variable name with the same parameters. Confluence treats matching names as copies, so one form input fills both occurrences. Use different names for genuinely different answers.
Create a sample and inspect the output
Save the template and create a new document from it. Enter Payments as the area and inspect both occurrences. Check list choices and long inputs; switch a field to Multi-line Text when a single-line answer would truncate the author’s intended explanation.
Common mistakes
Giving different inputs the same name
Matching variable names represent the same input. Distinct facts need distinct names and deliberate parameter choices.
Sources and verification
Based on product documentation checked on 2026-11-04. This is a documentation-based guide, not a hands-on benchmark. Features and availability can change.