
Integrate pdfRest with Zapier Automation & Google Drive Storage
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".
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.
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.
Start by selecting an event that will start your Zap (Trigger).
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:
- Set the Trigger event to New File in Folder.
- Log into your Google account under Account. There should be a "Select" button that will open a dialog so that you may log in.
- You may optionally name this step whatever you'd like.
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.
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".
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.
In the Setup step, select POST
as the Action event.
In the Configure step:
- Set the URL to
https://api.pdfrest.com/upload
, orhttps://eu-api.pdfrest.com/upload
if you want to make this automation GDPR-compliant. - Under Data, set the key as
url
and the value as the "File" from the Google Drive trigger
- Finally, under Headers, set your API Key as the value for Api-Key.
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:
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.
In the Configure step:
- Set the URL to
https://api.pdfrest.com/pdf
, orhttps://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. - Under Data, set the key as
id
and the value as "Files ID".
- 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:
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:
- Set the Action event to
Upload File
. - Log into your Google Drive account under Account.
In the Configure step, configure the options like so:
- 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".
- Under File, choose the
outputUrl
returned from the previous Webhook step (step 3 in this example). - Optionally configure the "Convert to Document?", "File Name", and "File Extension" options to your needs.
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:
And you will see the final converted PDF file in Google Drive.
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?