
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
In this tutorial, you will learn how to automatically convert a Google Sheets file into a PDF in landscape orientation using PDF.co and Zapier.
This workflow is useful when you have a spreadsheet stored in Google Drive and want Zapier to automatically send it to PDF.co for conversion. The final PDF can then be saved back to Google Drive or another cloud storage app.
Google Drive (New File in Folder) → PDF.co (Anything to PDF Converter) → Google Drive (Upload file)
This workflow uses PDF.co’s PDF from Excel / Anything to PDF conversion capability.
PDF.co API Endpoint: /v1/xls/convert/to/pdf
Endpoint Documentation: https://docs.pdf.co/api-reference/convert-from-excel/pdf
This endpoint converts an excel file into a PDF. In this tutorial, the source URL will be a Google Sheets export link that includes the landscape setting.
SOURCE FILE :
In Zapier, this endpoint is used through the PDF.co app action:
App: PDF.co
Action Event: Anything to PDF Converter
This PDF.co action receives the Google Sheets export URL and returns a PDF output URL.
Make sure you have the following:
To get your PDF.co API Key:
This step starts the automation setup in Zapier.
This step tells Zapier when the automation should start. In this tutorial, the Zap will run whenever a new spreadsheet file is added to a selected Google Drive folder.
This step allows Zapier to access the Google Drive folder where your spreadsheet file is stored.
This step tells Zapier which Google Drive folder to watch for new spreadsheet files.
Make sure the spreadsheet file in this folder is accessible to PDF.co. If the file is private, PDF.co may not be able to read it.
This step checks that Zapier can find a sample file from the selected Google Drive folder.
Look for the file ID in the test result. This ID will be used later to build the Google Sheets export URL.
This step sends the Google Sheets file information to PDF.co so it can be converted into a PDF.
This step tells PDF.co what file to convert and how to convert it into a landscape PDF.
In the PDF.co action setup, configure the fields as follows.
Choose: URL to a XLS or XLSX spreadsheet file, or a PDF.co file token (filetoken:// link)
This tells PDF.co that the source file will come from a URL.
In the Input Source field, enter the Google Sheets export URL below:
https://docs.google.com/spreadsheets/d/INSERT_FILE_ID/export?format=pdf&portrait=false
Then replace INSERT_FILE_ID with the dynamic File ID from the Google Drive trigger.
Your final mapped URL should look like this:
Do not type the file ID manually unless you are testing with one specific file only. For an automated Zap, insert the File ID field from the Google Drive trigger using Zapier’s field picker.
portrait=false is importantThe portrait=false part tells Google Sheets to export the file in landscape orientation.
If you want portrait orientation instead, remove this part from the URL:
&portrait=false
This step confirms that PDF.co can read the Google Sheets export URL and create the landscape PDF.
If the test fails, check that:
format=pdf&portrait=false.This step saves the PDF.co output file permanently in Google Drive.
PDF.co output links are temporary, so it is best to add a storage step instead of relying only on the temporary output URL.
This step confirms that the converted PDF is successfully saved to Google Drive.
This step turns on the automation so it can run automatically.
From now on, when a new Google Sheets file is added to the selected Google Drive folder, Zapier will send it to PDF.co, convert it into a landscape PDF, and save the final PDF in Google Drive.
Final Output
In this tutorial, you created a Zap that automatically converts a Google Sheets file into a landscape PDF using PDF.co and Zapier.
The workflow starts when a new file is added to a Google Drive folder. Zapier then sends the file information to PDF.co’s Anything to PDF Converter action, which uses the Google Sheets export URL to generate a landscape PDF. Finally, the converted PDF is saved back to Google Drive for permanent storage.
This setup helps users automate spreadsheet-to-PDF conversion without manually opening Google Sheets, changing export settings, or downloading files one by one.
Create an account, get an API key and test a request.