Merge tags are placeholders used to tell AnyMerge Docs where dynamic information should appear in your generated documents.
A merge tag is recognized only when it is enclosed in double curly brackets.
For example:
{{firstName}}
{{lastName}}
{{membershipID}}
During document generation, AnyMerge Docs replaces these merge tags with values from the corresponding row in your Google Sheets™ spreadsheet.
For example, if your sheet contains:
First Name|Last Name|Membership ID
Emma |Johnson |GOLD-001
and your template contains:
Name: {{firstName}} {{lastName}}
Membership ID: {{membershipID}}
the generated document will contain:
Name: Emma Johnson
Membership ID: GOLD-001
Merge tags themselves do not know where to get their values.
The connection between merge tags and spreadsheet columns is defined in Merge Mappings.
For example:
{{firstName}} → First Name column
{{lastName}} → Last Name column
{{membershipID}} → Membership ID column
AnyMerge Docs uses these mappings to determine how each merge tag should be processed.
Merge tags can contain:
Letters
Numbers
Spaces
Underscores
Accented characters
Characters from many languages
Examples of valid merge tags:
{{First Name}}
{{First_Name}}
{{day}}
{{día}}
{{день}}
{{วัน}}
{{يوم}}
You can use the same merge tag multiple times within the same template.
For example:
Dear {{firstName}},
Welcome to our membership program.
Sincerely,
{{firstName}} {{lastName}}
All occurrences of the merge tag will be replaced.
When merge tags are processed as text values, formatting from the template is preserved.
For example, you can apply:
Bold text
Font colors
Font sizes
Background colors
Headers and footers
The generated document will keep the formatting while replacing the merge tags with actual values.
Only properly formatted merge tags enclosed in double curly brackets are recognized.
The following examples will be ignored:
{Name}
{Name}}
{{Name}
Name}}
{{First^Name}}
{{Name(1)}}
Merge tags containing any of the following characters are not supported:
( ) ] + * ? | . $ ^ \
Merge tags are one of the fundamental concepts of AnyMerge Docs. Once you understand them, creating personalized documents becomes as simple as placing placeholders where you want your data to appear.
Learn more: