
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
14 MIN READ
Automatically compress PDFs added to Google Drive, save the results, and notify recipients through Amazon SNS. This workflow uses PDF.co for compression and shares a link to the saved document.
You’ll need:
Create a Zap and select Google Drive as the trigger app.
Use a folder dedicated to PDF files so other document types do not enter the compression workflow.
Add PDF.co and select Compress and Optimize PDF. Connect your account through the OAuth sign-in window and authorize access.
Configure the action:
compressed-report.pdf, or build a name using the original filename.For API-based implementations, the current compression endpoint is POST /v2/pdf/compress. See the PDF.co compression documentation.
Test the PDF.co action and open the returned PDF URL.
Check the file size and confirm that text and images remain suitable for your needs. The amount of compression depends on the original document.
Add Google Drive → Upload File and configure:
Test the action and confirm the PDF appears in Google Drive. Saving the file here preserves it beyond the lifetime of PDF.co’s temporary output link.
Keep this destination separate from the trigger folder to prevent the saved PDF from restarting the workflow.
Add Amazon SNS → Create Message and connect your AWS account using Zapier’s connection prompts.
Configure:
Your PDF is ready.For example:
Your compressed PDF is ready.
View or download it here: [map the uploaded file’s Google Drive link]
Insert the actual mapped link rather than typing the bracketed placeholder. The message shares a link; it does not attach the PDF. See Amazon SNS’s Zapier action.
Test the SNS action, check that a subscribed recipient receives the message, and verify they can open the PDF.
Publish the Zap. New PDFs added to your input folder will now be compressed, saved in Google Drive, and shared through an SNS notification.
By utilizing tools like PDF.co and Amazon SNS, you can efficiently compress and distribute PDF files without sacrificing quality or speed. Additionally, by automating the process with a Zap, you can save time and ensure that your files are always sent in a timely and consistent manner.
Create an account, get an API key and test a request.