How to create your template using placeholders

Togetha DocGen uses a Word document as a template for making your final document, so the first thing to do is to create your Word document template.

Creating your template

Togetha DocGen uses a Word document as a template. Word has the concept of templates, but you can just use a plain Word document.

Create your Word document, add your branding, terms and conditions, and any details you want the document to include.

Then you need to add placeholders for your fields in Jira. If you have used automations before, you’ll be familiar with smart values like {{issue.description}}.

Simply place a smart value in your Word document where you want that value substituted (see the attached example Template and Placeholder examples)

Placeholder examples

Your placeholders will be different depending on whether you are using standard Jira issue fields, Jira custom fields or JSM form fields. Custom fields will need a ‘cf.’ added at the beginning of the smart value and Form fields will need an 'f.' This will trigger the placeholders to be replaced by the correct data from the work item.

Placeholder

Example

Source

Standard smart values

{{issue.summary}}

Jira issue fields

Custom fields

{{cf.My Custom Field}}

Jira custom fields by name

JSM form answers

{{f.Question Label}} 

or 

{{forms.last.Question Label}}

JSM form answers

Fallback options for empty values

If you have a smart value placeholder in your template and there is not a corresponding field in your work item, you can define in your template how you would like this to be handled by using Fallbacks.

Use | to define ordered fallbacks and the first non-empty value will be added to the document.

{{issue.duedate | issue.created | 'date not available'}}

Method calls

The table below shows examples of how you can add methods to your smart values to get a more detailed result eg text showing in UPPERCASE or lowercase, or how to format the dates differently. Please note that the supported date tokens are dd (day), mm (month), yyyy (4-digit year), yy (2-digit year).

Method

Example

Result

.upper()

{{issue.summary.upper()}}

Uppercase string

.lower()

{{issue.summary.lower()}}

Lowercase string

.format('dd/mm/yyyy')

{{issue.duedate.format('dd/mm/yyyy')}}

Date formatted as 17/03/2026

.join(', ')

{{issue.labels.join(', ')}}

Array joined as string

Example word document Template

Software Request Template.docx


Placeholder examples

Placeholder examples-FINAL (1).docx