The document is commercial contract for my clients. Every time I fill the document I need to write the name, the address, id, etc. of my client several times in different places of the document. Since the document has 13 pages it is time wasting. Using placeholder would allow me to fill the data just one time

Is there any way to use Placeholders in Google Docs?

My {NAME} ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec {ID} quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In {ADDRESS} enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.


5 Answers 5


You could think of it as a mail-merge field: put merge fields in, and then each time you use the document to generate a contract, just have one row (the current client's details) in the data file. That said Google Documents don't directly support mail merge (yet -but I expect they will sooner or later). However there do appear to be some options - see this help forum article: http://productforums.google.com/forum/#!topic/docs/c6NBVY9xDDE

Another option is just to use a (or several) phrases that you are 100% sure won't appear anywhere else in the document (eg [CUST-NAME] ), and then use Edit > Find and replace > Replace all when you are ready to generate a document for a specific client. This is a little more work each time you set up the document, but easier to set up.


I'm still looking for a better way, but this is my solution for extensive text replacing.

I used Autocrat to accomplish this:

  1. I created my Google Docs text files and analyzed what I needed to be replaced.
  2. Words that needed to be replaced became placeholders << placeholder1 >>, << placeholder2 >>, << placeholder3 >>,... (But with more significant meaning and without the spaces).
  3. I created a Google Spreadsheet, with column names representing the placeholders.
  4. I used Autocrat to create a merge, linking all columns to placeholders.
  5. Autocrat creates a new file with the replaced text.
  6. Have a coffee.

This is commonly known as "mail merge".

If you have to do this just very few times a day and have very few placeholders, using the built-in find & replace could be good enough but if you have several placeholders and/or have to do this tens or hundreds of times a day it worthy to create an script by using Google Apps Script or use one already published as a Google Documents add-on. If know how to work with APIs you could use the recent launched Google Documents API.

On https://developers.google.com/apps-script there are some samples about how to do a mail-merge using Google Apps Script




You could use the Script Editor to whip up an add-on that will do just that, or you could use an existing add-on, like Doc Variables.


Google recently introduced a dynamic placeholders feature for Google Workspace* they called Variable Chips.

Google Workspace Updates, May 2023:

Simplify workflows in Google Docs with variable chips

Today, we’re introducing variable chips, a new feature that makes document creation for things like invoices, contracts, or broader communications much easier.

Simply pre-define and insert placeholders such as a client name, contract number, or an address, and then update it throughout an entire document by editing the value in one place. Using variables as dynamic placeholders makes template creation more straightforward, whether that is through custom building blocks or using the document as a template.

Steps to Create a Variable Chip

Source:   Google Help: Insert and use variable chips

  1. On your computer, open a document in Google Docs.
  2. Select Insert > Smart chips > Variables.
    Type @ and select Variable.
  3. Click Insert new variable.
  4. [Optional] Edit the default name.
  5. Click Create


* Availability:

  • Available to Google Workspace Business Standard, Business Plus, Enterprise Standard, Enterprise Plus, Education Plus customers and Nonprofits
  • Not available to Google Workspace Essentials Starter, Business Starter, Enterprise Essentials, Enterprise Essentials Plus, Education Fundamentals, Education Standard, the Teaching and Learning Upgrade, Frontline Starter, and Frontline Standard
  • Not available to users with personal Google Accounts
  • One thing to keep in mind with Variables is that when you update a variable, it updates every instance of the variable, so you can't have repeatable blocks or building blocks without the variables messing with each other
    – BooBailey
    Commented May 28 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.