Automated PDF to HTML Conversion via Google Drive - n8n Workflow

Deploy this powerful n8n workflow to automatically convert newly uploaded PDFs in Google Drive into ready-to-use HTML files using the PDF.co API. This efficient n8n automation saves significant manual time and effort, making it one of the most useful n8n templates for document processing.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Digital Publishers and content managers needing dynamic HTML conversion from source documents.
Developers requiring automated document preparation for web integration.
Anyone looking for robust n8n templates for file processing and cloud automation.
Users who frequently process PDFs and want to leverage the power of a dedicated n8n node for document conversion.

Overview

This specialized n8n workflow solves the common problem of manually converting PDF documents for web use. By deploying this automation, any PDF file placed in a designated Google Drive folder instantly triggers the conversion process. The workflow utilizes the reliable PDF.co service via an HTTP Request n8n node, transforming the file into a clean HTML format. The result is then saved back into Google Drive. This n8n workflow ensures a seamless, hands-free operation, drastically improving efficiency for content ingestion and archiving. It is a perfect example of how combining an n8n trigger with API services creates powerful automation.

How it Works


  1. Google Drive Trigger: The n8n trigger starts when a new file is uploaded to the specified Google Drive folder. It polls for new events continuously.

  2. PDF Filter: The If n8n node checks the file's MIME type. The n8n workflow proceeds only if the file is confirmed as application/pdf, filtering out irrelevant uploads.

  3. API Conversion: An HTTP Request n8n node sends the Google Drive link (webViewLink) of the PDF to the https://api.pdf.co/v1/pdf/convert/to/html endpoint. It initiates the PDF to HTML conversion.

  4. Binary Preparation: The Code n8n node (titled "Convert to Binary File") takes the string-based HTML output from the API response and converts it into a standardized n8n binary object. This crucial step prepares the data for cloud storage.

  5. Final Storage: The Google Drive n8n node takes the newly created binary file and uploads it to the designated output folder, completing the automated PDF to HTML conversion process within the n8n workflow.

Installation Guide


  1. Import: Import this n8n workflow JSON into your n8n instance.

  2. Google Drive Setup: Configure the Google Drive Trigger n8n node and the final Google Drive n8n node with your OAuth2 credentials. Specify the 'Folder to Watch' in the n8n trigger and the destination folder for the final HTML file.

  3. PDF.co Credentials: Set up a Generic HTTP Header Auth credential for the HTTP Request n8n node. This requires your PDF.co API key, which must be configured as a request header.

  4. Activate: Review all connections in the n8n workflow, save it, and activate the Google Drive Trigger n8n node to begin monitoring for new files.

Node Details

Google Drive Trigger n8n node: Function: Acts as the primary n8n trigger, polling a specific Google Drive folder every minute for new file creation events. Key Configuration: Event: fileCreated, Trigger On: specificFolder.
If n8n node: Function: Implements conditional logic to ensure only PDF files (mimeType equals application/pdf) proceed to the conversion step.
HTTP Request n8n node: Function: Handles the core conversion logic by calling the PDF.co API endpoint. It uses the incoming Google Drive webViewLink as the source URL for the PDF. This n8n node requires the PDF.co API key via HTTP Header Authentication.
Convert to Binary File (Code n8n node): Function: A custom JavaScript n8n node that transforms the string-based HTML response received from the PDF.co API into a base64 encoded binary file object, making it compatible with the final file upload n8n node.


  • Google Drive n8n node: Function: Uploads the final converted HTML file (sample.html) back to a specified Google Drive folder. This is the last step in this powerful n8n workflow.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

A Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.

Featured*