Create a PDF from Airtable Data Using PDF.co and Zapier
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.
Prerequisites
- Airtable, Zapier, and PDF.co accounts
- An Airtable table containing the information for the PDF
- At least one sample Airtable record
Step 1: Create the Airtable Trigger
Create a new Zap and select Airtable as the trigger app.
Configure the trigger:
- Choose New Record as the trigger event.
- Connect your Airtable account.
- Select the base and table containing the PDF data.
- Optionally select a view if only records from that view should be processed.
- Test the trigger and select a sample record.
The sample record provides the fields that will be inserted into the PDF.
Step 2: Add PDF.co HTML to PDF
Add an action to the Zap:
- Select PDF.co.
- Choose HTML to PDF.
- Select Add a new account.
- Sign in to PDF.co and authorize Zapier to access your account.
Step 3: Create the HTML Layout
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.
Step 4: Configure the PDF Settings
Configure the remaining PDF.co fields:
- Page Orientation: Select Portrait or Landscape.
- Page Size: Select a standard size such as Letter or A4.
- Custom Page Size: Leave empty when using a standard page size.
- Custom Margins: Enter a value such as
10mmor10mm 10mm 10mm 10mm. - Render Page Background: Enable this to preserve the background colors defined in the HTML.
- Media Type: Select Print for standard PDF output.
- Do Not Wait Until Full Page Load: Leave disabled for raw HTML.
- HTML Template Data: Leave empty because Airtable fields are mapped directly into the HTML.
- Name: Enter an output name such as
customer-report.pdf. - Custom Profiles: Leave empty unless additional API options are required.
You can include an Airtable value in the file name:
report-[Airtable Record ID].pdf
Step 5: Test the Action
Test the PDF.co action.
A successful response includes a temporary URL for the generated PDF. Open the URL and verify that:
- The correct Airtable values appear.
- The page size and orientation are correct.
- Background colors and formatting are preserved.
- The output file name is suitable.
Step 6: Store or Deliver the PDF
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:
- Folder: Select the destination folder.
- File: Map the PDF.co
url. - File Name: Map the PDF.co output name.
- Convert to Google Docs: Disable this option.
You can alternatively upload the PDF to Dropbox, attach it to an email, or save its URL back to Airtable.
Step 7: Publish the Zap
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.
Conclusion
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:
Related Tutorials

