Blog post

Convert HTML files to images with Nutrient Document Web Services API on Zapier

This tutorial shows you how to convert HTML files into high-resolution images using the Nutrient Document Web Services API on Zapier. The workflow monitors a Google Drive folder for uploaded HTML files and converts them into your selected image format.

Illustration: Convert HTML files to images with Nutrient Document Web Services API on Zapier

What is Zapier?

Zapier is an automation platform that connects your favorite apps and services with no code required. You can build “Zaps” to automate repetitive tasks by setting up triggers and actions between apps like Google Drive, Slack, Gmail, and more.

In this tutorial, you’ll learn how to use Zapier to automatically convert HTML files into JPG, PNG, or TIFF images using the Nutrient API.

What is the Nutrient API?

Nutrient Document Web Services API is a powerful platform for document automation. With your free account, you get 100 credits, which you can use to perform various document operations. Each tool (e.g. conversion, signing, flattening) consumes a different amount of credits depending on complexity.

Nutrient offers more than 30 tools with the ability to:

  • Convert images and documents to PDF

  • Merge, split, or reorder pages

  • Add digital signatures, watermarks, or annotations

  • Run OCR, redact, flatten, and more

All you need is an API key from a free account to get started. You can chain these tools together in Zapier to build powerful, automated PDF workflows.

What you’ll need

  • A Zapier account (a pro plan is necessary for multi-step Zaps)

  • A Google Drive account

  • A public HTML file stored in Google Drive

  • A Nutrient Document Web Services API key — sign up here

Step 1 — Trigger a new file in a Google Drive folder

  1. Select Google Drive as the trigger app.

Google Drive app selected in Zapier trigger step

  1. Choose the New File in Folder trigger event.

New File in Folder selected as Google Drive trigger

  1. Connect your Google Drive account.

  2. Choose your drive and specify the folder containing your HTML files.

Google Drive folder configuration for HTML uploads

  • Ensure that the option for Include Deleted Files? is set to Only return non-deleted files.

  1. Test the trigger to confirm Zapier can detect the HTML file. You can use our sample file for testing this step.

Trigger test confirming file detection from Drive

Step 2 — Convert HTML to image action (Nutrient API)

  1. Next, select Nutrient Document Web Services API as the app.

Zapier step selecting Nutrient API as action app

  1. Choose the Convert HTML to Image action.

Nutrient API action dropdown showing ‘Convert HTML to Image’

  1. Connect your Nutrient API account using your API key.

Zapier authentication field for Nutrient API key

You can find your API key in the Nutrient dashboard.

Find your Nutrient API key for authentication

  1. Fill in the required fields:

  • HTML file — Choose the file from the Google Drive trigger.

  • Output Format — Select from jpg, png, or tiff.

  • Output File Name — Optional — Choose a file, e.g. web-preview.jpg.

HTML to Image configuration showing input fields

  1. Test the action step to confirm the conversion.

Test showing successful image output from HTML file

Step 3 — Upload the updated PDF to Google Drive

  1. Now, add another step by selecting Google Drive as the app and Upload File as the action event. Connect your Google Drive account if needed.

Google Drive Upload File selected in Zapier

  1. Map the output from the previous step and select your target folder.

Mapped output file from HTML to Image conversion

  1. Test the Zap to confirm the image is saved in Google Drive.

Confirmation that image file was uploaded to Drive

Conclusion

With this workflow, you’ve automated the process of turning HTML files into image files using Zapier and the Nutrient API. This setup is ideal for visual snapshots of web content, HTML templates, or stored previews. Extend the flow by adding steps like emailing the image, compressing it, or organizing it in folders based on source.

Author
Hulya Masharipov
Hulya Masharipov Technical Writer

Hulya is a frontend web developer and technical writer at Nutrient who enjoys creating responsive, scalable, and maintainable web experiences. She’s passionate about open source, web accessibility, cybersecurity privacy, and blockchain.

Free trial Ready to get started?
Free trial