
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
This tutorial shows how to generate a PDF automatically whenever a new record is added to Airtable. Zapier retrieves the record, inserts its values into an HTML layout, and sends the HTML to PDF.co.
Create a new Zap and select Airtable as the trigger app.
Configure the trigger:
The sample record provides the fields that will be inserted into the PDF.
Add an action to the Zap:
In HTML or URL Input, enter the HTML for the document.
Use Zapier’s field picker to replace the bracketed examples with values from the Airtable trigger.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
color: #222222;
}
h1 {
color: #2457a7;
}
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
padding: 10px;
border: 1px solid #cccccc;
text-align: left;
}
th {
width: 35%;
background-color: #f3f5f7;
}
</style>
</head>
<body>
<h1>Customer Report</h1>
<table>
<tr>
<th>Customer Name</th>
<td>[Map the Airtable Customer Name field]</td>
</tr>
<tr>
<th>Email</th>
<td>[Map the Airtable Email field]</td>
</tr>
<tr>
<th>Order Number</th>
<td>[Map the Airtable Order Number field]</td>
</tr>
<tr>
<th>Order Date</th>
<td>[Map the Airtable Order Date field]</td>
</tr>
<tr>
<th>Total</th>
<td>[Map the Airtable Total field]</td>
</tr>
</table>
</body>
</html>The HTML and CSS can be adjusted to include branding, colors, images, headers, or additional Airtable fields.
Leave HTML Template ID empty because this workflow supplies the HTML directly.
Configure the remaining PDF.co fields:
10mm or 10mm 10mm 10mm 10mm.customer-report.pdf.You can include an Airtable value in the file name:
report-[Airtable Record ID].pdf
Test the PDF.co action.
A successful response includes a temporary URL for the generated PDF. Open the URL and verify that:
PDF.co output URLs are temporary. Add another Zapier action if the document must be retained or delivered.
For example, add Google Drive – Upload File and configure:
url.You can alternatively upload the PDF to Dropbox, attach it to an email, or save its URL back to Airtable.
Publish the Zap after all steps test successfully.
Whenever a new record is added to the selected Airtable table, Zapier will build the HTML document, convert it to PDF with PDF.co, and pass the result to the final storage or delivery step.
You now have an automated workflow that creates formatted PDF documents from Airtable records using the dedicated PDF.co HTML to PDF action.
See the PDF.co HTML to PDF documentation for additional template and rendering options.
This is just one example of the amazing capabilities of PDF.co and Zapier integration. It can also help you easily generate PDF reports using:
Create an account, get an API key and test a request.