Integrate pdfRest with Zapier Automation & Google Drive Storage

Integrate pdfRest with Zapier Automation & Google Drive Storage

Integrate pdfRest API Tools with Zapier to Compress, Merge, Split, Convert, Secure PDFs, and more using the Zapier low-code automation service.
Share this page

Low-Code Automation: Connect pdfRest and Zapier

Ready to add powerful PDF automation to your Zapier workflows? This guide will show you how to use Zapier's built-in webhook features to connect with the pdfRest API Toolkit. This means you can create Zaps that automatically convert, merge, and modify your documents, all from within your favorite apps like Google Drive or Gmail.

While pdfRest is not currently listed within the Zapier marketplace, pdfRest is callable as a REST API service, allowing for easy integration with Zapier workflows and other low/no-code services.

To get started, take a minute to sign up for a free Starter account with pdfRest to generate a dedicated API Key, which will be required for sending calls to the service.


Tutorial: Getting Started with Zapier, pdfRest, & Google Drive Integration

When working with pdfRest in Zapier, your workflow will always start with a trigger. This initial step is what kicks your automation into action, providing the files that pdfRest will process. While you can customize these triggers to suit any workflow, this tutorial will demonstrate a common scenario: automatically converting an image in Google Drive to a PDF. We'll set up a Zap that's triggered when a new file is uploaded to a specific folder in Google Drive, uses pdfRest to convert it to a PDF, and then saves the converted file to a separate output folder.


Step 1: Set Up Your Google Drive Folders

We'll start with creating folders in Google Drive. Create two folders in Google Drive. For this tutorial we'll name the folders "pdfRest-Zapier Input" and "pdfRest-Zapier Output".

Google Drive New Folder.png

pdfRest-Zapier Folders.png

At this point you can upload a file to the "pdfRest-Zapier Input" folder. For this example we will be using a JPG image file.

Google Drive Input File.png


Step 2: Create a New Zap and Set a Trigger

Sign up for Zapier and create a Zap. Note that we'll be using premium features of Zapier which will require a Professional or above account.

Create A Zap.png

Start by selecting an event that will start your Zap (Trigger).

Zap Trigger.png

Select the Google Drive Trigger. You may also search for the Google Drive integration by typing 'google drive' into the search box.

For the Google Drive Setup step, configure the options like so:

  1. Set the Trigger event to New File in Folder.
  2. Log into your Google account under Account. There should be a "Select" button that will open a dialog so that you may log in.
  3. You may optionally name this step whatever you'd like.

Google Drive Trigger Setup.png

For the Configure step, configure the options like so:
For Folder, select the "pdfRest-Zapier Input" folder you created earlier. You may optionally configure subfolder options to your needs.

Google Drive Trigger Configure.png

For the Test step, hit "Test trigger" to detect the new files uploaded. A newly detected uploaded file will appear, and clicking into it reveals the file metadata. Note that the Title matches the file that was uploaded. After confirming things are correct, you can proceed to the next step by hitting "Continue with selected record".

Google Drive Test Input File.png


Step 3: Upload the File to pdfRest

Now you're ready to send your first call to pdfRest, which will use the Upload Files tool to prepare files for subsequent processing steps.

In the next step, select "Webhooks" as the action. This can be found under Utilities, or search 'webhooks' in the search bar.

Zapier Webhooks.png

In the Setup step, select POST as the Action event.

Webhook Setup.png

In the Configure step:

  1. Set the URL to https://api.pdfrest.com/upload, or https://eu-api.pdfrest.com/upload if you want to make this automation GDPR-compliant.
  2. Under Data, set the key as url and the value as the "File" from the Google Drive trigger

Webhook Configure File.png

  1. Finally, under Headers, set your API Key as the value for Api-Key.

Webhook Configure Api-Key.png

In the Test step, you can test the upload step, and if this step succeeds, you will see a success with a return that looks similar to the following response:

Webhook Google Drive Successful Upload.png


Step 4: Convert the Image to PDF

Now that you have a step that is uploading a file and returning a JSON response, you'll need to pass the results of that response to another webhook action to do the actual conversion step.

Add another step to the workflow with the + Add Step button, and select Webhooks again. In the Setup step, select POST as the Action event.

Zapier Add Step.png

In the Configure step:

  1. Set the URL to https://api.pdfrest.com/pdf, or https://eu-api.pdfrest.com/pdf if you want to make this automation GDPR-compliant. Follow the convention of the url you made the request to in the previous Webhook configuration.
  2. Under Data, set the key as id and the value as "Files ID".

Webhook Configure PDF Endpoint Options.png

  1. Finally, under Headers, set your API Key as the value for Api-Key, as done in the previous webhook.

In the Test step, you can test the conversion step, and if this step succeeds, you will see a success with a return that looks similar to the following response:

Webhook Test Successful PDF Conversion.png


Step 5: Upload the PDF to Google Drive

Finally, we'll add a step to upload the file to a Google Drive folder. Add another step to the workflow with the + Add Step button, and select the Google Drive integration.

In the Setup step, configure the options like so:

  1. Set the Action event to Upload File.
  2. Log into your Google Drive account under Account.

Webhook Setup Google Drive.png

In the Configure step, configure the options like so:

  1. Choose where the uploaded file will go under Drive and Folder. In this example it will be under "My Google Drive" and "pdfRest-Zapier Output".
  2. Under File, choose the outputUrl returned from the previous Webhook step (step 3 in this example).
  3. Optionally configure the "Convert to Document?", "File Name", and "File Extension" options to your needs.

Webhook Configure Google Drive.png

In the Test step, you can test the final upload step, and if this step succeeds, you will see a success with a return that looks similar to the following response:

Webhook Test Successful Google Drive Upload.png

And you will see the final converted PDF file in Google Drive.

Google Drive Uploaded Converted PDF.png

Of course, you can customize the end step to pass pdfRest output files anywhere you need to send them for the next steps in their journey.

If you have any trouble getting this set up or would like more information about how pdfRest can solve your PDF processing challenges, please let us know how we can help!


Conclusion

You've now built a powerful, automated workflow that processes documents with pdfRest and Zapier! This simple example demonstrates how to seamlessly connect your cloud storage to the pdfRest API Toolkit. You can easily adapt this workflow to trigger on different events, convert to other formats, or perform more complex tasks like merging, securing, or splitting documents.

Sign up now for a free pdfRest Starter account to get started! What's the first Zap you'll build with pdfRest?

Generate a self-service API Key now!
Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.