Skip to content

This is a Google Apps script that allows you to Mail Merge using Google Docs/Sheets

Notifications You must be signed in to change notification settings

cwg83/Google-Sheets-Mail-Merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

About

This is a Google Apps script written in Javascript used for mail merging an email and attached PDF within Google docs, using a Form as a way to fill in the spreadsheet with merge Keys. The code executes on submition of the form.

Usage

  1. Create a new Google Sheet and name it whatever you like.
  2. Add a form to your sheet: Click Tools > Create a form. This script is made for a 7 question form, but you can add more into the code. The second question on the form is the email address to which the email and pdf file are sent.
  3. Add the script to the Google Sheet: Click Tools > Script editor to open the script editor, then copy the script code from this file into your script editor. Save and reload your Google sheet.
  4. Create a new Google Document and name it whatever you like.
  5. Replace EXAMPLEID123 and DOCUMENT NAME with the ID and name of your template document, respectively. The ID of a document can be derived from the URL:
https://docs.google.com/document/d/DOCUMENTID/edit
  1. Optional: Add an email to the cc variable that will be CCd when the email is sent.

You will need to give permission to the script in order for it to send emails on your behalf as well as view and utilize other documents in your drive.

About

This is a Google Apps script that allows you to Mail Merge using Google Docs/Sheets

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published