GAS – Create PDF from Google Form Data, Save to Google Drive and Email It!

I’ll make some assumptions on this one, that you know how to create a Google Form and Responses sheet, and that you can create and edit a Google Doc

Create your Google Form with the questions you want. If you are inside a domain you can automatically collect the user’s email address too

Create a Google Document to use as a template. Leave space for user submissions, and in these spaces include a unique keyword for each answer

In my example I have three questions, and have the keywords: colour01, pet01, friend01 entered in my Google Document

Now open the Responses spreadsheet and the then Tools > Script Editor

Your script should look something like this:

Now set up a trigger to fire the script when a new form is submitted, and do a test run of the script to allow it to run

There are other ways to grab the data using getRange and getValues, then use an if function to test a unique value in a column to find the row you want to work with.

Leave a Reply

Your email address will not be published. Required fields are marked *