Automating the conversion of multi-page PDF documents into individual JPEG images can save you hours of manual work. This guide will walk you through setting up an automated workflow that takes an incoming PDF, splits it into separate image files, and uploads each page directly to a designated Google Drive folder.
Before you begin, ensure you have access to your automation platform (such as Zapier), a PDF conversion tool (like PDF.co), and the target Google Drive account where you want to store the images.
How the workflow operates
When a multi-page PDF is converted to images, the conversion tool generates a list of image URLs (one for each page). To handle this, our workflow uses a Looping step to process each URL individually and upload it to Google Drive.
flowchart TD
A["Trigger: New PDF Document"] --> B["Action: Convert PDF to JPEG"]
B --> C["Action: Start Loop (Line Items)"]
C --> D["Action: Upload JPEG to Google Drive"]
D --> E{"Is last iteration?"}
E -->|No| C
E -->|Yes| F["Workflow Complete"]Building the automation
Follow these steps to configure your PDF-to-JPG "wood chipper" workflow.
- 1
Set up the PDF conversion step
Add a Convert PDF to JPEG action to your workflow. Map the URL or file object of your incoming PDF to this step. The output of this step will be an array (or list) of URLs, with each URL pointing to a JPEG of a single page.
- 2
Create a loop for multi-page documents
Because the previous step outputs multiple images, you need to add a Looping action (e.g., Loop from Line Items).
Configure the loop to iterate over the list of URLs provided by the conversion step. Set the iteration limit high enough to accommodate your longest PDFs (e.g.,500). - 3
Configure the Google Drive upload
Inside your loop, add an Upload File action for Google Drive. Configure the following parameters:
Drive & Folder: Select your target destination (e.g.,
Completed SketchesorPDF->JPG Tool).File: Map this to the current URL from your Looping step.
Convert to Document: Set this to
Falseso the file remains a standard JPEG.File Extension: Specify
jpg.
- 4
Set up dynamic file naming
To prevent files from overwriting each other, use the loop iteration number in the file name. In the New File Name field, combine the original file name with the current loop iteration.
For example:
[Original_Filename]-[Loop_Iteration]. This ensures your files are saved sequentially, likeSketch-1.jpg,Sketch-2.jpg, etc.
Keep your folders organized
If you process a high volume of documents, consider adding a date-formatting step before the loop to dynamically create and route files into daily or weekly Google Drive folders.
Advanced configurations
Depending on your specific use case, you might want to add extra logic to your workflow to handle complex scenarios.
Extracting data from filenames
If your incoming PDFs have structured names (e.g., 123-Main-St-Sketches.pdf), you can use a Formatter step at the beginning of your workflow to extract specific text (like the address). You can then use this extracted text to dynamically name your output JPEGs or even create a new Google Drive subfolder for that specific address.
Triggering actions after the loop finishes
If you want to send an email notification or update a database only after all pages have been successfully uploaded, add a Filter step after your Google Drive upload. Set the filter criteria to check if loop_iteration_is_last exactly matches true. Any actions placed after this filter will only run once per document, rather than once per page.
Configuration Reference
When mapping your fields in the Google Drive upload step, ensure your parameters match the following required structure:
| Parameter | Recommended Value | Description |
|---|---|---|
file | Looping URL Output | The direct URL to the JPEG generated for the current loop iteration. |
convert | False | Prevents Google Drive from attempting to OCR or convert the image into a Google Doc. |
new_name | [Name]-[Iteration] | Ensures multi-page documents are numbered sequentially in your folder. |
new_extension | jpg | Explicitly defines the file type for the Google Drive previewer. |
Watch your task usage
Looping workflows consume tasks for every iteration. If you convert a 50-page PDF, the loop will execute the Google Drive upload step 50 times. Ensure your automation plan has sufficient task limits to handle your expected document volume.