Template is a Google Document. You can create a brand new document or turn an existing document into template by adding merge fields. Add-on creates for each row in a sheet a copy of the template you selected and replaces merge fields in the template with values from columns in a sheet.

MERGE fields

A merge field will be recognized only if you enclose it in double curly brackets like {{this is a merge field}} otherwise will be ignored and treated as normal text. You can use white spaces as well as accented characters.

Sample Template

Take a look at the sample template which is used in the tutorial. Notice there are three merge fields defined in the header {{day}}, {{month}} and {{year}}. Then the document itself contains multiple times the tags {{name}} and {{surname}}. Notice the rich formatting like color and font size. For merge fields which are mapped as text rich formatting will be preserved in the output document.

Along the text merge fields there are {{qr}} and {{image}} placeholders which are mapped as QR code and image. Finally the footer contains again same merge fields as are in the header but the date pattern is different.

Prohibited Characters

If a merge field contains one of these characters the tag will be ignored:



Valid merge fields which will be recognized by the add-on:

    • {{First Name}}, {{First_Name}}
    • {{day}}, {{día}}, {{день}}, {{วัน}}, {{يوم}}

Invalid merge fields which will be ignored:

  • only single bracket or no brackets - {Name, {Name}, {{Name}, {Name}}, Name}, Name}}
  • use of prohibited character in tag - {{First^Name}}, {{Name(1)}}