Skip to main content

Automatic PDF compression with iLovePDF for Google Drive files

Workflow preview

Workflow preview
100%
Automatic PDF compression with iLovePDF for Google Drive files preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Watch Google Drive folder and use iLovePDF Compress Tool to save it in another Google Drive folder This n8n template shows how to upload a file in your Google Drive desired folder, compress it with...

Best for

  • File Management automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googledrive, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.merge, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ilovepdf.

Original n8n.io source

1.1 Workflow description

Title
Automatic PDF compression with iLovePDF for Google Drive files
Workflow name
Automatic PDF compression with iLovePDF for Google Drive files

Watch Google Drive folder and use iLovePDF Compress Tool to save it in another Google Drive folder

This n8n template shows how to upload a file in your Google Drive desired folder, compress it with the iLovePDF tool and move the compressed file to another folder.

Good to know

This is just an example of using it for you to know how the flow should start to work without issues. After the "combine" step, you can change it according your needs but always maintaining the four main steps of ILoveAPI's request workflow: start, upload, process and download (e.g., an step for sending an email with the compressed file instead of moving it to another folder)

Use cases are many: With this template you can monitor a 'to-process' folder for large documents, automatically compress them for better storage efficiency, and move them to an archive folder, all without manual intervention. Then you can explore adapting it to have the functionalities that go best with you!

How it works

1. Google Drive Trigger: The workflow starts when a new file is added to a specific Google Drive folder (the source folder). 2. Authentication: The Public Key is sent to the iLoveAPI authentication server to get a time-sensitive Bearer Token. 3. Start Task: A new compress task is initiated with the iLoveAPI server, returning a Task ID and Server Address. 4. Download/Upload: The file is downloaded from Google Drive and then immediately uploaded to the dedicated iLoveAPI Server using the Task ID. 5. Process: The main compression is executed by sending the Task ID, the server_filename, and the original file name to the iLoveAPI /process endpoint. 6. Download Compressed File: Download the compressed file's binary data from the iLoveAPI /download endpoint. 7. Save Compressed File: The compressed PDF is uploaded to the designated Google Drive folder (the destination folder). 8. Move Original File: The original file in the source folder is moved to a separate location (e.g., an 'Archived' folder) to prevent the workflow from processing it again

How to use

  • Credentials: Set up your Google Drive and iLoveAPI credentials in n8n workflow.
  • iLoveAPI Public Key: Paste your iLoveAPI public key into the Send your iLoveAPI public key to their server node's body for authentication, and then in the Get task from iLoveAPI server node's body.
  • Source/Destination Folders: In the Upload your file to Google Drive (Trigger) and Save compressed file in your Google Drive (Action) nodes, select your desired source and destination folders, respectively.

Requirements

  • Google Drive account/credentials (for file monitoring and storage) -see the docs provided in the node if needed.
  • iLoveAPI account/API key (for the compression service).
  • An n8n instance (cloud or self-hosted).

Need Help? See the iLoveAPI documentation

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Download file

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 3 - Upload your file to Google Drive

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 4 - Group public key, task and downloaded file data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 5 - Compress your file

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Move compressed file to new Google Drive folder

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 7 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Download compressed file

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 10 - Send your iLoveAPI public key to their server

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Get task from iLoveAPI server

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Upload PDF to iLoveAPI server

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automatic PDF compression with iLovePDF for Google Drive files
Complexity advanced
Nodes 15
Categories File Management
Author ilovepdf
Published 12 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10766/10766.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatic PDF compression with iLovePDF for Google Drive files do?

Watch Google Drive folder and use iLovePDF Compress Tool to save it in another Google Drive folder This n8n template shows how to upload a file in your Google Drive desired folder, compress it with...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.