Automatically Convert PDFs to HTML and Publish Them to Amazon S3 with Zapier
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
- Google Drive detects a new PDF.
- PDF.co converts the PDF to HTML.
- 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:
- Select Google Drive.
- Choose New File in Folder.
- Connect your Google account.
- Select the drive and source folder.
- 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:
- Select PDF.co.
- Choose PDF to Anything.
- 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
falseso 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:
- Select Amazon S3.
- Choose Upload File.
- 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/htmlcontent 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

