
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
10 MIN READ
This tutorial shows how to extract a line item from a PDF and use it to create a customer invoice in QuickBooks Online.
You’ll need Make, a PDF.co account and API key, and a QuickBooks Online account with an existing customer and product or service.
Open the Document Parser Template Editor and create a template using your sample PDF.
Configure a table object to extract these columns:
Follow the Document Parser template creation guide for instructions on defining fields and tables.
Test the template, check the extracted values, then save it and copy its template ID.
Create a scenario and add PDF.co → Parse a Document. Connect your PDF.co account using your API key.
Configure the module:
filetoken:// link.See the Parse a Document module documentation for additional settings.
Run the PDF.co module once and inspect its Body output.
Locate the extracted table and identify the first data row. Confirm that its description, quantity, unit price, and line amount match the source PDF.
The available output names depend on your template, so map the fields from your own test results.
Add QuickBooks → Create an Invoice and connect your QuickBooks Online account.
Select the existing customer who should receive the invoice. Under Lines, add one sales-item line and configure:
Complete any applicable tax and currency settings. The selected item must reference a QuickBooks product or service—not just the extracted description. See QuickBooks invoice requirements.
Run the scenario and open the created invoice in QuickBooks. Check its customer, item, quantity, price, and total.
This example creates an invoice containing only the first extracted line item. To reproduce the entire source invoice, map every line item into the invoice’s Lines array before creating it.
For invoices with varying layouts, AI Invoice Parser is another extraction option that does not require a manually created template.
In this tutorial, we learned how to parse a document using the PDF.co Document Parser. We also learned how to create a QuickBooks Online Invoice using the parsed PDF data.
Create an account, get an API key and test a request.