PDF Generation Using Google Forms as Input, and Docs or Slides as Template

Introduction

If you are looking for a solution to generate PDF by using Google Forms as the input and Google Docs or Google Slides as the template, you may come to the right place. In my add-on Chalkline, you can automate the whole workflow.

Installation

Install from Google Workspace Marketplace

Demo

Try to submit this demo form below to get an email from me with the PDF as attachment.

https://forms.gle/Se5FiUGrup1WZay4A

YouTube

Check this video for the details if you prefer to watch video instructions.

Instructions (7 Steps)

Once you have the add-on installed, you can set up the automation by the following steps.

Step 1

Create a form and link it to a Google Sheets on your Google Drive. You can click the link below to get started.

https://docs.google.com/forms/create

Step 2

Create a template for the PDF generation in Google Docs or Google Slides with the placeholders in it.

* The placeholder is defined by the title of the field in the form and the double curly brackets, e.g. {{Name}}.

* You can use placeholders in the title of the template too.

Template example with Google Docs.

Template example with Google Slides.

 

Step 3

In the linked Google Sheets, open the Chalkline sidebar from “Extensions > Chalkline > Launch”.

Step 4

UID generation - The add-on can generate a unique ID for each response from the Google Forms and save them in a new column in the linked Google Sheets.

  • ID column header - The name of the column to save the UID.
  • ID prefix - The UID prefix to be added before the number digits.
  • ID number digits - The number digits length.
  • Current ID Index - The ID number will be used for the next response, use 1 for the initial set up.

* The ID column will be created automatically if it’s not found in the responses tab.

* The max number will be 10 ** digits - 1, e.g. The max number for 5 digits will be 10 ** 5 - 1 = 99,999.

Step 5

Set the template for the PDF generation.

  • Create PDF from template - The template URL we created in Step 2.
  • Move copy to trash - To create the PDF, the script will create a copy of the template to replace the placeholders. Normally, we should trash this file, but you have the option to keep it.
  • Move PDF to trash - If you just need to send the PDF in email (next step) and don’t need to save the PDF on your Drive for saving some space.

Step 6

Send the email with the PDF as an attachment.

  • Send email - Check to send the email.
  • Subject - The email subject.
  • To - The column name of the email address from the form responses sheet or a comma separated email address.
  • Message - The email body.
  • PDF as attachment - Check to include the PDF in the email.

* Placeholder can be used in both “Subject”, “Message”.

* When a list of email addresses is added for the “To” field, the email is always sent to the same recipients.

* You can use HTML to format the email message body.

Step 7

Finally, “CREATE” or “UPDATE” the settings to enable the automation, and you can submit a test response in the form to verify the setup.

* “DELETE” the trigger if you need to stop the automation.

Chalkline Playlist (follow for future updates)

Links

Hire me on Upwork (work with me)

Donate (PayPal)

YouTube (@ashtonfei)

YouTube (@ashtontheroad)

Github (@ashtonfei)

Twitter (@ashton_fei)

Instagram (@ashton.fei)

OneScript (my website)

Comments