
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
This tutorial shows how to turn each Google Forms response into a formatted PDF using Google Sheets, Zapier, and PDF.co.
The workflow follows this sequence:
Google Forms response → Google Sheets row → PDF.co HTML to PDF → PDF output
Open your Google Form and select the Responses tab. Create or select a linked Google Sheets spreadsheet.
Each form submission will be added to the spreadsheet as a new row. The column headings correspond to the questions in the form.
Submit a test response before creating the Zap. Zapier will use this row when testing the workflow.
Create a new Zap and select Google Sheets as the trigger application.
Configure the trigger:
Connect your Google account and test the trigger. Confirm that Zapier retrieves the test response and displays the submitted values.
Add an action and select PDF.co.
Choose HTML to PDF as the action event. Connect your PDF.co account when prompted and authorize Zapier to access it.
The dedicated HTML to PDF action accepts HTML code or a webpage URL and generates a PDF. See the HTML to PDF action documentation for all supported settings.
In HTML or URL Input, enter the HTML that will define the PDF’s content and formatting. Insert values from the Google Sheets trigger wherever the form response should appear.
For example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
color: #222;
}
h1 {
color: #2457a7;
border-bottom: 2px solid #2457a7;
padding-bottom: 10px;
}
.field {
margin-bottom: 16px;
}
.label {
font-weight: bold;
}
</style>
</head>
<body>
<h1>Job Application</h1>
<div class="field">
<span class="label">Name:</span>
{{Name}}
</div>
<div class="field">
<span class="label">Email:</span>
{{Email}}
</div>
<div class="field">
<span class="label">Phone:</span>
{{Phone Number}}
</div>
<div class="field">
<span class="label">Experience:</span>
{{Experience}}
</div>
</body>
</html>Replace each placeholder with the corresponding value from the Google Sheets trigger using Zapier’s data-mapping controls. The available fields will reflect the questions used in your form.
Configure the remaining PDF.co settings as needed:
Application-Name.pdf. The applicant’s name can be mapped from the trigger to create a unique filename.Test the PDF.co action.
A successful test returns a temporary URL for the generated PDF. Open the URL and confirm that:
If necessary, revise the HTML or PDF settings and test the action again.
Add another Zapier action to store or distribute the completed document. For example, you can:
Map the PDF.co output URL to the file field in the destination action. Test the complete workflow, then publish the Zap.
The Zap will now generate a formatted PDF whenever a new Google Forms response is added to the connected spreadsheet. The HTML template controls the document’s appearance, while values from the form personalize each generated PDF automatically.
Create an account, get an API key and test a request.