Google Forms collects answers but cannot turn them into a document. If you want each respondent to get a PDF (a receipt, a confirmation, a certificate), you need something to sit between the form and their inbox. Here are two ways to do it, with the steps for each.
How it works
Every method does the same four things when a response arrives:
- Copy a template document written in Google Docs.
- Replace the placeholders in the copy (like
{{Name}}) with the respondent's answers. - Export that copy as a PDF.
- Email the PDF to the address the respondent gave.
So the first job, in any method, is the same: write the template.
Write the template first
- In Google Docs, write the document as you want the PDF to look. Set the logo, fonts and page size now.
- Wherever an answer belongs, type the form question's title in double curly braces:
{{Name}},{{Course}},{{Amount paid}}. - Make the form question titles match the placeholders letter for letter.
{{Full name}}will not be filled by a question called "Name". - Add a question that collects the respondent's email address, with email validation switched on.
Method 1: an add-on, in three steps
This is the no-code route. FairSign Forms to PDF is a Google Forms add-on made for this job.
- Pick your form. Open the form, start FairSign Forms to PDF from the add-on menu, and choose the question that holds the respondent's email.
- Point to your template. Select the Google Doc you wrote above, or start from one of the starter templates in English, Simplified Chinese or Vietnamese. Set the email subject and the PDF file name.
- Turn it on and test. Submit one response yourself using your own email address. You should get the PDF within a minute or two.
From then on, every submission produces a PDF. The add-on runs inside your Google account: responses are not sent to our servers, and the mail goes out from your own address. The only outside request is a license check against Polar. The privacy page lists every permission and why it is needed.
Want to try it? Add FairSign Forms to PDF to Google Forms. It is free for 20 PDFs a month, and Pro is $69 a year. See pricing.
Method 2: a free Apps Script
If you are comfortable pasting code, Google's own scripting tool can do this for free. It takes about fifteen minutes the first time.
- In your form, open the Responses tab and click the green Sheets icon to link a Google Sheet. The script lives in that sheet.
- In the sheet, choose Extensions, then Apps Script.
- Delete the starter code and paste the script below. Replace
TEMPLATE_DOC_IDwith the long ID in your template's address (the part between/d/and/edit), and setEMAIL_QUESTIONto your email question's exact title. The script also looks for a question titledName; change that to match your form. - Open Triggers (the clock icon), click Add Trigger, choose the function
onFormSubmit, event source From spreadsheet, event type On form submit, and save. - Google asks you to authorize the script. Read the permissions, then continue.
- Submit a test response and check your inbox.
// Runs when a response is added to the linked Google Sheet.
const TEMPLATE_DOC_ID = 'PASTE_YOUR_TEMPLATE_DOC_ID_HERE';
const EMAIL_QUESTION = 'Email'; // the exact title of your email question
const SUBJECT = 'Your confirmation';
function onFormSubmit(e) {
const answers = e.namedValues; // { "Question title": ["answer"], ... }
const name = (answers['Name'] || [''])[0];
// 1. Copy the template
const copy = DriveApp.getFileById(TEMPLATE_DOC_ID).makeCopy('Confirmation - ' + name);
const doc = DocumentApp.openById(copy.getId());
const body = doc.getBody();
// 2. Replace every {{Question title}} with the answer
Object.keys(answers).forEach(function (title) {
const safe = title.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
body.replaceText('\\{\\{' + safe + '\\}\\}', answers[title][0]);
});
doc.saveAndClose();
// 3. Make a PDF and email it
const pdf = copy.getAs('application/pdf').setName('Confirmation - ' + name + '.pdf');
MailApp.sendEmail({
to: answers[EMAIL_QUESTION][0],
subject: SUBJECT,
body: 'Hi ' + name + ', your confirmation is attached.',
attachments: [pdf],
});
// 4. Tidy up the temporary copy
copy.setTrashed(true);
}
What to know about this approach:
- It runs under your account, so it counts against Google's daily email limit for that account.
- The placeholder matching is plain text. A mismatched question title leaves
{{...}}in the PDF. - Scripts are yours to maintain: if you change a question title, update the template too, and if the script fails, errors appear on the Executions page in Apps Script.
- Test with a short answer and a long one. Long answers can reflow your layout, so leave room in the template.
Common problems
- Placeholders show up in the PDF. The question title and the placeholder differ. Copy the title from the form and paste it between the braces. Watch for trailing spaces and question marks.
- The PDF has the wrong fonts. Use fonts available in Google Docs. Check the Doc's own File, Download, PDF output: the automatic PDF will look the same.
- No email. Check spam, then your Sent folder. Google limits how many emails an account can send per day, with a lower limit for free Gmail accounts than for Google Workspace. Hitting it stops all sending until it resets.
Which method to pick
Use the script if you have one form, a developer's patience and no budget. Use an add-on if you want it working in minutes, with templates in other languages, for several forms, or you would rather not maintain code. Either way, write the template first, and test with your own email before you share the form.
Short on time? Add FairSign Forms to PDF to Google Forms. It is free for 20 PDFs a month, and Pro is $69 a year. See pricing.