
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
4 MIN READ
This tutorial explains how to monitor an Excel workbook for new rows and use the data from each row to fill a PDF form automatically.
Before starting, make sure that:
Before building the Zap, determine the internal names of the fields in your PDF template.
You can use PDF.co’s Get PDF Information action with Extract Fillable Fields enabled. Alternatively, use the PDF.co Request Tester.
Record each field name and the page on which it appears. These values will be needed when configuring PDF Filler.
Sign in to Zapier and create a new Zap.
Select Microsoft Excel as the trigger app. Choose one of these trigger events:
Connect your Microsoft Excel account when prompted.
Configure the trigger by selecting:
Test the trigger. Zapier should return a sample row containing the column headers and values you want to place in the PDF.
If columns are missing, confirm that the workbook has headers in its first row and sample data in the following row. After changing the workbook’s structure, retest the trigger and remap its fields.
Add an action to the Zap and select PDF.co.
Choose PDF Filler as the action event and connect your PDF.co account using your API key.
Complete the following fields:
completed-form.pdf.Each fillable field uses this format:
page;fieldName;valueSeparate multiple fields with a vertical bar:
1;FullName;[Map the Name column from Excel]|1;Email;[Map the Email column from Excel]|1;Company;[Map the Company column from Excel]Replace FullName, Email, and Company with the actual internal field names from your PDF. Insert the corresponding Excel values using Zapier’s data-mapping menu rather than typing them as fixed text.
For checkbox fields, the expected value is commonly true or false, although the exact value can depend on how the original PDF form was created.
Optional settings include:
Test the action and confirm that PDF.co returns a successful response and an output URL.
Open the URL and verify that:
If a field remains empty, confirm that its internal field name and page value are correct and that the mapped Excel column contains data.
PDF.co output URLs are temporary. If the completed form must be retained, add another action to save it to permanent storage such as OneDrive, Google Drive, Dropbox, or your document-management system.
You can also add an email action to send the completed PDF to the appropriate recipient.
After testing the entire workflow, publish the Zap. Each new Excel row will now create a filled PDF form automatically.
In this tutorial, you learned how to automatically fill a PDF form template with Excel data using Zapier. You also learned how to use the PDF.co PDF Filler and fill out the PDF form fields.
Create an account, get an API key and test a request.