---
title: "Automating Google Docs Creation from Google Spreadsheet using Google Apps Script"
author: "Martin Hawksey"
date: 2023-06-08T21:10:21+00:00
canonical_url: https://pulse.appsscript.info/p/2023/06/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2023/06/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script.md
categories:
  - "Beginner"
  - "Docs"
  - "Sheets"
  - "Solutions"
tags:
  - "Medium"
  - "pranaysuyash"
featured_image: https://pulse.appsscript.info/files/2023/06/1cPUoO44sHq7N3ttFEoa0-Q.png
description: "I liked the simplicity of this script which does a very basic data merge on Google Docs template from Google Sheets data. There is a bit of piecing together to get this one working but basically it's uses a very simple replaceText pattern which maps the spreadsheet column number to replacement tokens {{col1}}, {{col2}}, etc. Read the source post to see all the code."
---

# Automating Google Docs Creation from Google Spreadsheet using Google Apps Script

![Automating Google Docs Creation from Google Spreadsheet using Google Apps Script](https://pulse.appsscript.info/files/2023/06/1cPUoO44sHq7N3ttFEoa0-Q.png)

> [https://medium.com/@pranaysuyash/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script-6643c1027d8d](https://medium.com/@pranaysuyash/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script-6643c1027d8d)
> If you frequently find yourself creating multiple Google Docs that follow a similar template and pull data from a Google Spreadsheet, this tutorial is for you. Today, I’m going to show you how to automate the process using Google Apps Script.

I liked the simplicity of this script which does a very basic data merge on Google Docs template from Google Sheets data. There is a bit of piecing together to get this one working but basically it’s uses a very simple replaceText pattern which maps the spreadsheet column number to replacement tokens `{{col1}}`, `{{col2}}`, etc. Read the source post to see all the code.

Source: *[Automating Google Docs Creation from Google Spreadsheet using Google Apps Script*](https://medium.com/@pranaysuyash/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script-6643c1027d8d)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2023/06/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script/](https://pulse.appsscript.info/p/2023/06/automating-google-docs-creation-from-google-spreadsheet-using-google-apps-script/)*
