Extract Images from a PDF and Add Them to Google Slides Using Zapier
This tutorial shows how to monitor a Google Drive folder for new PDFs, extract images from each document with PDF.co, and insert those images into a Google Slides template.
Prerequisites
You will need:
- A Zapier account
- A PDF.co account
- A Google Drive folder for incoming PDFs
- A Google Slides template containing image placeholders such as
{{Image1}}and{{Image2}}
The following workflow assumes that each PDF contains two images. Add more placeholders and upload steps if your documents contain additional images.
Step 1: Trigger the Zap from Google Drive
- Create a new Zap.
- Select Google Drive as the trigger app.
- Choose New File in Folder as the trigger event.
- Sign in to Google Drive.
- Select the drive and folder that will receive the PDF files.
- Test the trigger and select a sample PDF.
The trigger output should include the PDF in the File field.
Step 2: Convert the PDF to JSON
- Add PDF.co as the next app.
- Select PDF to Anything Converter as the action.
- Sign in and authorize your PDF.co account.
- Configure the action:
- Output Format: JSON
- Source File URL: Map the Google Drive File value
- Page Selection: Leave blank to process every page
- File Name: Enter a name such as
extracted-content.json - Define Custom Profiles: Enter:
{ 'SaveImages': 'Embed' }
- Test the action.
PDF.co converts the document to JSON and embeds the extracted images as Base64 data URIs.
If the action returns a URL for the JSON file, retrieve that URL with a Webhooks by Zapier – GET step before continuing.
Step 3: Upload the First Extracted Image
Google Slides requires an accessible image URL. It cannot insert an image directly from a Base64 data URI.
- Add another PDF.co step.
- Select Custom API Call.
- Enter the endpoint:
/v1/file/upload/base64 - Use the
POSTmethod. - Enter the request body:
{
"file": "MAP_THE_FIRST_EMBEDDED_IMAGE_HERE",
"name": "image-1.png"
}- Map the first embedded image value from the PDF-to-JSON result into the
fileproperty. - Test the step.
PDF.co returns a temporary URL for the uploaded image.
Step 4: Upload the Second Extracted Image
Duplicate the preceding PDF.co upload step and make these changes:
{
"file": "MAP_THE_SECOND_EMBEDDED_IMAGE_HERE",
"name": "image-2.png"
}Map the second embedded image from the JSON result and test the step. Save the returned image URL for the Google Slides action.
Step 5: Create the Google Slides Presentation
- Add Google Slides as the next app.
- Select Create Presentation From Template.
- Sign in to Google Slides.
- Select the presentation containing your image placeholders.
- Enter a title for the new presentation.
- Map the URL returned by the first PDF.co upload step to Image1.
- Map the URL returned by the second upload step to Image2.
- Select the destination folder and configure any remaining presentation settings.
- Test the action.
Open the generated presentation and confirm that the extracted images appear in the correct placeholders.
Step 6: Publish the Zap
After verifying the presentation, publish the Zap. Each new PDF added to the selected Google Drive folder will now be converted to JSON, its embedded images will be uploaded, and a new Google Slides presentation will be created from the template.
The uploaded PDF.co URLs are temporary, but Google Slides imports the images while creating the presentation, so their later expiration does not remove the images from the completed slides.
In this tutorial, you learned how to extract images from PDF and add them to Google Slides using Zapier. You learned how to use the PDF.co Web API to extract images from PDF. You also learned how to set up the Google Slides to add the extracted images.
Related Tutorials

