I used Google Forms to make a 20-question quiz and added a page to the response spreadsheet that automatically grades the quiz immediately after it's submitted. I have this script in place to automatically email me the graded quiz:
function sendEmails() {
var emailAddress = "[email protected]";
var file=DriveApp.getFileById('1ipTs_BEwXqurQUfcZ_QO1E110vw3Zv_06BQ7bLbdTkY');
MailApp.sendEmail(emailAddress, 'Completed Test', 'Please Review the attached test.', {attachments: [file.getAs(MimeType.PDF)]});
}
I would like to rename the pdf file with the quiz takers name ('tim laird.pdf' instead of the current 'completed test.pdf'). The quiz takers first and last name are in cell A1 and B1 of the sheet being sent as the pdf.
Can anybody help with that?