Important: The workflow uses webContentLink
to access the PDF file, so ensure your Google Drive folder has appropriate sharing permissions.
Auto Convert PDFs to HTML and Publish to Web
What You'll Have When Done A fully automated system that monitors your Google Drive for new PDF documents, instantly converts them into clean HTML files using PDF.co, and publishes the HTML content directly to your web server via FTP for immediate online availability.
Prerequisites Before you begin, make sure you have:
- A PDF.co API Key (Get yours here)
- Google Drive OAuth2 credentials configured in n8n
- FTP access to your web server (host, username, password)
- An n8n instance (cloud or self-hosted)
- A Google Drive folder for incoming PDF documents
- A web server directory where HTML files will be published
Quick Start Options
Option A: I Want It Working Now
- Import this workflow template → Download JSON File
- Connect your Google Drive account in n8n
- Add your PDF.co API key in the PDF.co node
- Configure your FTP credentials for web server access
- Update the Google Drive Trigger with your source folder
- Update the FTP path to your web directory (e.g.,
htdocs/
) - Test with a sample PDF document (e.g., a product brochure or report)
- Activate and let it run
Option B: I Want to Build It Step-by-Step Follow the 3-step guide below to create the automation from scratch.
What This Automation Does (Overview)
- Monitors a Google Drive folder for new PDF files
- Converts PDFs to clean, web-ready HTML using PDF.co
- Publishes the HTML files directly to your web server via FTP
- Makes content instantly available on your website
Step-by-Step Build Guide
Step 1: Monitor for New PDF Documents
Node: Google Drive Trigger
Settings:
- Trigger On:
Changes Involving a Specific Folder
- Folder From List: Your source folder
- Watch For:
File Created
What This Does: Automatically detects when a new PDF document is added to your designated Google Drive folder.
Success Looks Like: The trigger outputs file metadata (id, name, webContentLink) as soon as a PDF is uploaded to the folder.
Step 2: Convert PDF to HTML
Node: PDF.co API → Convert from PDF
Settings:
- PDF URL:
={{ $json.webContentLink }}
- Convert Type:
PDF to HTML
- Advanced Options → Name:
={{ $json.name }}
What This Does: Calls PDF.co to fetch the PDF from Google Drive and convert it into clean, structured HTML code.
Success Looks Like: PDF.co returns HTML content in the response body, ready for web publishing.
You can learn more about PDF to HTML at the API Docs.
Step 3: Publish HTML to Web Server
Node: FTP → Upload
Settings:
- Path:
=htdocs/ {{ $json.name }}
- Binary Data: False (unchecked)
- File Content:
={{ $json.body }}
What This Does: Uploads the converted HTML content directly to your web server's public directory via FTP.
Success Looks Like: The HTML file appears in your web directory and is immediately accessible via your website URL.
Congrats! You've created a powerful workflow that transforms static PDF documents into web-accessible HTML content with zero manual effort. Perfect for automatically publishing reports, documentation, brochures, or any PDF content to your website.
Built something cool with this workflow? Share it with us @pdfdotco
Related Tutorials



