Compress PDFs and Share Links Through Amazon SNS Using Zapier

14 Minutes 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.

Prerequisites

You’ll need:

  • PDF.co, Zapier, and Google Drive accounts.
  • An Amazon SNS topic with confirmed email subscribers.
  • Two Google Drive folders: one for incoming PDFs and another for compressed files.
  • Viewer access to the output folder for your intended recipients.

Step 1: Trigger the Workflow from Google Drive

Create a Zap and select Google Drive as the trigger app.

  1. Choose New File in Folder.
  2. Connect your Google Drive account.
  3. Select the drive and folder containing incoming PDFs.
  4. Add a sample PDF to that folder and test the trigger.

Use a folder dedicated to PDF files so other document types do not enter the compression workflow.

Step 2: Configure PDF.co Compression

Add PDF.co and select Compress and Optimize PDF. Connect your account through the OAuth sign-in window and authorize access.

Configure the action:

  • Source File URL: Map the downloadable file URL from the Google Drive trigger. Use a download link rather than a browser preview link, and ensure PDF.co can access it.
  • File Name: Enter an output name, such as compressed-report.pdf, or build a name using the original filename.
  • Custom Profiles: Leave blank to use the default settings.

For API-based implementations, the current compression endpoint is POST /v2/pdf/compress. See the PDF.co compression documentation.

Step 3: Test the Compression

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.

Step 4: Save the Compressed PDF

Add Google Drive → Upload File and configure:

  • Drive: Select your destination drive.
  • Folder: Select the compressed-files folder.
  • File: Map the output URL returned by PDF.co.
  • File Name: Enter or map the desired filename.

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.

Step 5: Send the Link Through Amazon SNS

Add Amazon SNS → Create Message and connect your AWS account using Zapier’s connection prompts.

Configure:

  • Topic: Select the topic containing your subscribers.
  • Subject: Enter a subject such as Your PDF is ready.
  • Message: Add a short message and map the Google Drive viewing link from the upload step.

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.

Step 6: Test and Publish

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.

Related Tutorials

See Related Tutorials