n8n

How to Automate Google Drive PDF to HTML Publishing?

Turn new PDFs in a Google Drive folder into ready to use HTML files with no manual work. This setup is great for teams that post brochures, reports, or guides on the web and want fast, consistent output.

Here is how it runs. A Google Drive trigger checks a chosen folder every minute and picks up new files. A filter step lets only PDFs pass. The flow sends the file link to a conversion service through a secure HTTP request and gets back HTML text. A small code step converts that text into a binary file. The final step uploads the HTML file to a Google Drive folder so it is stored and easy to share. Teams get faster publishing and a clear file path from source PDF to final HTML.

To put this in place, you need Google Drive access and an API key from the conversion service. Point the trigger to the correct folder, add the API key in the HTTP header, and map the file name you want for the HTML file. Expect a big time win, often cutting work from about 10 minutes per file to 1 minute. It fits content teams, documentation owners, and operations staff that need repeatable, web ready output.

What are the key features?

  • Google Drive trigger checks a specific folder every minute and captures new files with their share links.
  • Conditional filter ensures only PDF files move forward to conversion.
  • HTTP Request calls PDF.co to convert PDFs to HTML using an API key in the header.
  • Code step converts the HTML text response into a binary file ready for upload.
  • Google Drive upload saves the HTML file to your chosen folder with a clear name.
  • Polling approach runs reliably without extra servers or webhooks.

What are the benefits?

  • Reduce manual conversion from 10 minutes to 1 minute per file
  • Automate 90 percent of repetitive file handling
  • Store HTML outputs in a single folder for easy access
  • Connect Google Drive and PDF.co with no custom code
  • Handle up to 5 times more documents per day with the same team
  • Cut upload and download errors that happen with manual steps

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive and PDF.co. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Google Drive credential. If unsure, double click the Google Drive Trigger node, open the 'Credential to connect with' dropdown, click 'Create new credential', then follow the on screen instructions to connect your Google account.
  4. Open the Google Drive Trigger node. Choose your Google Drive credential, set the event to file created, and set the folder to watch by pasting the folder URL. Keep the polling at every minute for near real time pickup.
  5. Open the If node and set a condition so only PDFs continue. A simple check is to compare the file mime type to application/pdf or the file name extension to .pdf.
  6. Create a PDF.co API key in your PDF.co account under the API or dashboard section. In n8n credentials, add an HTTP Header Auth credential with header name x-api-key and the value set to your API key.
  7. Open the HTTP Request node. Set method to POST and URL to https://api.pdf.co/v1/pdf/convert/to/html. Enable Send Body and Send Headers. Select the HTTP Header Auth credential you created. In Body Parameters, add url mapped to the trigger’s webViewLink, set inline to true, async to false, and pages to 0- for all pages.
  8. Open the Code node and paste the provided code that turns the HTML string in the body into a binary buffer. Make sure the binary property name is data so the next node can read it.
  9. Open the Google Drive upload node. Select your Google Drive credential, choose Upload as the operation, set Binary Property to data, set the file name you want such as sample.html or map it from the original name, and choose the target folder by URL.
  10. Test the flow. Upload a PDF to the watched Google Drive folder and run the workflow once. Confirm that an HTML file appears in the target folder and opens correctly.
  11. Troubleshoot common issues. If conversion fails, make sure the PDF is accessible by the link used or adjust sharing to anyone with the link. If you see 401 or 403 errors, check the PDF.co API key and quota. If the upload fails, confirm the binary property is data and that the target folder ID is correct.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

PDF.co

Sign up

Free trial: $0 / mo, 10,000 credits

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.