New: PDF/A-3b conversion with a compliance report included.See Docs

Automatically Convert PDFs to HTML and Publish Them to Amazon S3 with Zapier

10 Minutes Read

This tutorial creates a workflow that monitors a Google Drive folder, converts new PDFs to HTML with PDF.co, and publishes the resulting files to an Amazon S3 bucket.

Workflow

  1. Google Drive detects a new PDF.
  2. PDF.co converts the PDF to HTML.
  3. Amazon S3 stores the HTML file.

Prerequisites

  • Zapier and PDF.co accounts
  • A Google Drive folder for incoming PDFs
  • An Amazon S3 bucket
  • Permission to upload objects to the S3 bucket
  • At least one sample PDF in Google Drive

If the HTML should be publicly accessible as a website, configure the S3 bucket for static website hosting and apply the appropriate access policy.

Step 1: Create the Google Drive Trigger

Create a new Zap and configure the trigger:

  1. Select Google Drive.
  2. Choose New File in Folder.
  3. Connect your Google account.
  4. Select the drive and source folder.
  5. Test the trigger and select a sample PDF.

If the folder may contain other file types, add Filter by Zapier and continue only when the MIME type is application/pdf.

Step 2: Convert the PDF to HTML

Add a PDF.co action:

  1. Select PDF.co.
  2. Choose PDF to Anything.
  3. Sign in and authorize Zapier to access your PDF.co account.

Configure the action:

  • Output Format: Select HTML or HTML code reproduced from PDF.
  • Source PDF URL: Map the Google Drive File value.
  • Page Selection: Leave empty to convert every page.
  • Output File Name: Enter a name ending in .html.
  • Inline Output Option: Set to false so PDF.co returns a file URL.
  • OCR Language: Select the document’s language if scanned PDFs will be processed.
  • Extraction Region: Leave empty to process the entire page.
  • Enable Line Grouping: Leave disabled unless table content requires it.
  • Unwrap: Leave disabled unless line grouping is enabled.

To include the PDF’s images in a self-contained HTML file, enter this under Custom Profiles:

{ "SaveImages": "Embed", "OptimizeImages": true, "OutputPageWidth": 1024 }

Test the action and open the returned url to verify the HTML output.

For additional options, see the PDF.co PDF to Anything documentation.

Step 3: Upload the HTML to Amazon S3

Add another action:

  1. Select Amazon S3.
  2. Choose Upload File.
  3. Connect the AWS account that has access to the destination bucket.

Configure the action:

  • Bucket: Select the S3 bucket.
  • Key: Enter the object name, such as documents/report.html.
  • File: Map the PDF.co url.
  • MIME Type: Enter text/html.

Use a unique key for each source file to prevent later uploads from replacing earlier ones. For example, include the Google Drive file ID or name in the key.

Test the action and confirm that the HTML object appears in the S3 bucket.

Step 4: Verify the Published Page

If static website hosting is enabled, open the object through the bucket’s website endpoint.

Confirm that:

  • The text and formatting are present.
  • Embedded images load correctly.
  • The object uses the text/html content type.
  • The file is available through the intended public or restricted access method.

Step 5: Publish the Zap

Publish the Zap after all steps test successfully.

Each new PDF added to the selected Google Drive folder will now be converted to HTML and uploaded directly to Amazon S3.

Conclusion

This workflow uses PDF.co’s PDF to Anything action for the PDF-to-HTML conversion and sends the resulting file directly to Amazon S3.

Related Tutorials

See Related Tutorials