How to Generate PDF files from Google Form Responses

With Document Studio, you can easily generate PDF files, or documents of any other file type, when someone submits your Google Form. The generated documents are stored in Google Drive, you can email them to the form respondent, share the file with team members or even print the documents via Google Cloud Print.

This step by step tutorial explains how to generate a PDF file from Google Form submissions.

Step 1: Create the Google Form

Go to forms.google.com and create a Google Form. We’ll build a Contact Us form that asks for the respondent’s name, email, postal address and comments.

google-forms-pdf.png

Go to the Response Tab, click the 3-dot vertical menu and select the response destination. The Google Form should be storing the responses in a Google Spreadsheet for the document merge add-on to work.

google-form-spreadsheet.png

Step 3: Create the Document Template

Build a new template using either Google Docs, Spreadsheet or Google Slide. We’ll create a one-page slide presentation with template {{markers}} corresponding to the various questions in our Google Form.

document-markers.png

Please ensure that the template markers in the document template are correctly mapped and that the marker name should be the same as your form question. For instance, if you have a question in Google Forms that is titled “Your postal address?”, the marker name in the document template should read {{Your postal address?}}.

Step 4: Configure Document Studio

Open the Google Forms responses spreadsheet, go to the add-ons menu and choose Document Studio.

4a. Configure Document Template

Go to the Document Merge section and select the template you created in the previous step. You can also personalize the file name to include form answers.

4b. Configure Email Template

Open the Google Forms Merge section and design your email template. You can use can column header in the email subject and body using the {{marker}} notation. The merged document will be added to the email as an attachment. You can also choose the email field in the “Send Email” drop-down and the email will be sent to the form respondent.

email-template.png

Tip: If you would like to include all the form answers in the email, use the {{All Answers}} marker anywhere in the message body and it will be replaced with an HTML table containing all the form answers.

4c. Configure Google Drive

Your generated documents will be stored in Google Drive. Expand the “Upload to Google Drive” section and select the folder in Drive where the documents would be saved.  You can also customize the subfolder path with form answers so the form response files are stored in separate folders.

\\Comments\\{{Name}}

Step 5: Merge on Form Submit

The configuration is complete and we are ready to run the form submit trigger that will automatically merge documents and send the emails as soon as a new form is submitted.

google-form-submit.png

Go to the Save Configuration section, check the “Merge on Form Submit” option and click the Save Settings button. Now submit a test form entry and it should create the documents and send the emails.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.