

We have seen how you can automatically convert Google Form responses to PDFs for multiple people.
#Turn google doc into pdf how to
If the user needs something more configurable, maintainable or sophisticated, they can use the Form Publisher add-on How to Convert Google Form Responses to PDF: The Summary The script on successful execution will send out an email to each recipient.
#Turn google doc into pdf pdf
To check the PDF, go to the assigned folder and there you will see the PDF file. Since we have added the trigger we do not have to run the program to convert Google Form responses to PDF.Īs soon as the responses come in, it will automatically create a PDF. After the PDF file has been created, I am going to print a confirmation message that will tell us that the PDF file has been created. I have assigned the name and roll number of the student as the name of the PDF file.

Here I have set the name of the PDF that has to be saved. PDF_folder.createFile(BLOBPDF).setName(info + " " + info) Ĭonsole.log("The file has been created ")

const BLOBPDF = PDF_Template.getAs(MimeType.PDF) For this I have used the OpenDoc.saveAndClose() function. Īfter putting all the values, we have to save and close the Google Doc. So for each of the values I have created a variable in the Google Doc such as the (1) Marks, (2) Name, (3) Roll number, (4) Email Address. For each row it will take the value and substitute the value in the Google Doc. ndEmail(email, "ID CARD", "This is your ID Card.", ) is in Google Doc and the other one is from the Google Sheet, so it will replace it.
#Turn google doc into pdf code
Let’s Code using driveapp.getfolderbyid and other functions. This brings up the Script Editor as shown below: While you are in the sheet, launch the Apps Script Editor. More tips on Google Apps Script here Step 2: Setting up automation with the App Script in Google Sheets
