How to Use Html2Pdf.app with Zapier to Save Webpage PDFs
Convert webpage URLs to PDFs with Html2Pdf.app and Zapier. Set up the API call, route the PDF to storage, and handle binary responses and callbacks.
Use a Zapier trigger that provides a webpage URL, call Html2Pdf.app’s conversion API, then pass the resulting PDF to a destination that accepts a file. Html2Pdf.app has a generic API integration path; the reviewed sources do not establish a native Html2Pdf.app Zapier app or a turnkey way for a basic webhook action to save its binary response. Verify the file handoff for your chosen Zap before relying on it.
How the workflow fits together
- Trigger: Choose a Zap trigger that supplies the URL to archive. The source can be any app that provides a URL; the exact trigger depends on your workflow.
- Convert: Send the URL to
POST https://api.html2pdf.app/v1/generatewith your Html2Pdf.app API key. - Handle the response: A successful synchronous conversion returns PDF binary data. Confirm that your Zapier action exposes that response in a form the next step can use.
- Save: Map a file object or a supported file URL into a file-capable destination. If the response cannot be passed through as a file, use an intermediary that turns it into an accessible file URL or a file object.
Zapier’s generic webhook actions can call external APIs, but its Webhooks Custom Request does not support file objects. Zapier documents file fields as requiring a file object or a supported file URL. The exact conversion-to-storage handoff therefore depends on the selected Zapier action and destination.
Before you build the Zap
- Create an Html2Pdf.app account and obtain an API key from its service.
- Choose a trigger that gives you a complete, publicly reachable webpage URL. Html2Pdf.app must be able to access the page and its required resources.
- Decide where the PDF should go and confirm that the destination accepts a file object or a file URL.
- Choose synchronous conversion if the Zap should wait for the PDF in the same run. Consider the callback flow for longer-running conversions if you have a public HTTPS endpoint that can receive and process the callback.
- Keep the API key in a credential-managed connection or trusted server-side environment. Avoid exposing it in browser code, public repositories, or templates.
Configure the synchronous API call in Zapier
- Add a trigger. Set up the source app and event that produce the webpage URL. Test the trigger and identify the URL field in its sample output.
- Add an API or webhook action. Zapier documents ways to make API requests, including webhook actions and API-by-Zapier. Choose the option that fits your credential and response-handling needs.
- Set the request. Use
POSTwith the Html2Pdf.app endpoint, anapplication/jsonbody, and theX-API-Keyheader. The required JSON field ishtml. Put the public webpage URL in that field. Despite the field name, the API also accepts a URL there; it can alternatively contain raw HTML. - Test the response. Check the HTTP status before treating the response as a PDF. On success, the synchronous response body is binary PDF data rather than JSON or plain text.
- Map the PDF to storage. Inspect what the Zapier action makes available to later steps. If it exposes a supported file object, map it to the destination’s file field. If not, use a verified intermediary that returns an accessible file URL or file object, then map that value to storage.
- Test the whole path. Run a representative page through the trigger, conversion, handoff, and destination. Open the saved file and check its contents before turning the Zap on for important records.
The Zapier Webhooks help article lists a 5 MB payload limit. Do not assume a large PDF can pass through every webhook action or destination. Check the limits and response behavior of the specific route you select.
Request details and a direct API example
This example shows the documented request shape. Run it in a trusted server-side environment, replace the placeholders, and save the successful binary response as a PDF. It demonstrates the conversion call; it does not by itself configure Zapier or upload the file to a storage destination.
curl -X POST 'https://api.html2pdf.app/v1/generate' \
-H 'X-API-Key: YOUR_HTML2PDF_API_KEY' \
-H 'Content-Type: application/json' \
--data '{"html":"https://example.com"}' \
--output webpage.pdf
Replace https://example.com with the URL from your trigger. Use an HTTPS URL that the conversion service can reach. Check the HTTP status in your client before accepting the output as a valid PDF; error responses are not PDFs.
Raw HTML and page rendering
The html input can contain either a public URL or raw HTML. A URL lets the conversion service fetch the page and its resources. When supplying HTML directly, make sure any referenced CSS, fonts, and images are accessible to the renderer. The rendered result can vary with CSS media selection, resource availability, and JavaScript timing. Test pages that use client-side rendering, delayed content, or externally hosted assets.
Html2Pdf.app’s documentation describes rendering-related settings and behavior. Consult its API documentation for the current request options and details before depending on a particular output configuration.
When to use the asynchronous callback
For a longer-running conversion, Html2Pdf.app documents an asynchronous option using callBackUrl. The service posts to that URL with a JSON payload containing a base64-encoded PDF in document; an optional state value is echoed back.
- Provide a publicly reachable HTTPS callback URL as specified by the API documentation.
- Accept the callback request and validate it using the authentication or verification mechanism supported by your implementation.
- Decode the base64
documentvalue into PDF bytes. - Convert those bytes into the file object or accessible URL your destination accepts.
- Make processing idempotent. Html2Pdf.app says callback delivery can be retried up to three times after a failure, so a repeated callback must not create unintended duplicate records or actions.
This callback flow is not the same as a synchronous Zapier action. The documentation does not say Zapier automatically decodes the base64 document and stores it as a file. Your callback endpoint or another verified step must handle that conversion and file handoff.
Errors and troubleshooting
| Symptom or status | Likely cause | What to check |
|---|---|---|
| 400 Bad Request | The source page is inaccessible, or a request parameter is invalid. | Check that the URL is public and correctly mapped, required fields are present, and the request body is valid JSON. |
| 401 Unauthorized | The API key is missing or invalid. | Confirm the X-API-Key header and use the correct key from a trusted credential store. |
| 403 Forbidden | The account has reached a plan limit. | Review the account’s plan and usage limits before retrying. |
| 500 Internal Server Error | An unhandled error occurred on the service. | Retry with increasing delays if the error persists, then contact Html2Pdf.app support. |
| The output is an error page or invalid PDF | The workflow may have saved an error response as though it were a PDF. | Check the HTTP status before forwarding the body; inspect the response and run the conversion again after correcting the cause. |
| The PDF is missing styles, images, or fonts | Resources may not be reachable by the renderer, or rendering behavior may differ from a browser session. | Check asset accessibility and CSS media behavior. Test the actual URL and consult the API documentation for rendering options. |
| Content rendered before or after expected state | JavaScript or delayed resources may not have completed when capture began. | Review the page’s load behavior and the API’s documented rendering controls; test pages with representative timing. |
| The Zap has no usable file in the next step | The webhook action may expose a binary body in a form the destination cannot accept. | Confirm response mapping and file-field requirements. Add a verified intermediary that supplies a supported file object or accessible file URL. |
| Large file handoff fails | A webhook or destination payload limit may be exceeded. | Check the 5 MB limit listed for the reviewed Zapier webhook action and the limits of the specific destination or intermediary. |
| Duplicate work after a callback | A callback delivery may have been retried after a failure. | Use the echoed state or another stable job identifier to make callback processing idempotent. |
Correct invalid inputs, authentication problems, and plan-limit errors before retrying; repeated retries will not fix them. For transient server errors, use increasing delays rather than rapid repeated requests.
Security, privacy, and reliability
- Protect credentials: Keep the API key out of client-side JavaScript and public source control. Zapier’s API-by-Zapier credentials are stored in a connection; generic webhook fields may be visible to people who can access the Zap, so consider who can view and edit it.
- Check source access: The conversion service needs access to the supplied URL and required assets. A page that is private, session-dependent, or blocked from the service may fail or render differently.
- Plan for callback retries: Make callback processing idempotent and return a successful response only when your endpoint has handled the delivery as intended.
- Review data handling: Html2Pdf.app says generated PDFs are processed temporarily rather than permanently stored on its servers. It also says raw HTML or text is not stored in conversion logs, while selected metadata and a source URL may be retained. Review its privacy policy and data processing terms against your requirements.
- Validate every handoff: A successful conversion does not guarantee that Zapier or the destination has accepted the PDF. Check both the conversion response and the final saved file.
Performance and cost considerations
Rendering time depends on the page, its resources, JavaScript behavior, and the conversion route. A synchronous Zap waits for the API action to finish, while the callback approach lets your system handle completion separately. Choose based on whether the workflow needs the file in the same run and whether you can receive and process an HTTPS callback.
Account for both the conversion plan’s limits and any Zapier task, webhook, file-size, or destination limits that apply to your setup. The reviewed material does not establish a universal end-to-end price or a guaranteed file-transfer size for this workflow. Verify current plan details and test representative PDF sizes before estimating recurring costs.
Or skip the browser setup
If you need clean website screenshots as well as PDF workflows, ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. Its clean-shot flow accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server includes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
Example request for a screenshot (replace the URL and API key):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. For Zapier, you would still need to verify how the selected action handles the returned file.
ScreenshotNeo includes 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000 shots, and yearly billing gives two months free. Every feature is on every plan. Sign up for free and get 1,000 screenshots a month with no card.
FAQ
Is Html2Pdf.app a built-in Zapier app?
The reviewed sources support calling its API through Zapier’s generic API or webhook tools. They do not verify a native Html2Pdf.app integration.
Does the conversion endpoint return a PDF URL?
The documented successful synchronous response is PDF binary data. For the asynchronous callback, the PDF is base64-encoded in the document field.
Can I convert HTML without hosting a webpage?
Yes. The documented html input accepts raw HTML as well as a public webpage URL.
Can I send the PDF directly to any storage app?
Only if the selected Zapier path provides a file object or supported file URL in the form that destination accepts. Verify the complete handoff with a test run.
Does the API key belong in the page’s JavaScript?
No. Keep it in a trusted server-side environment or a credential-managed connection, with access limited to people who need it.
Sources
- Html2Pdf.app documentation for endpoint, input, authentication, response, callbacks, errors, rendering, and data handling.
- Zapier: Send webhooks in Zap workflows for webhook actions and payload limits.
- Zapier: Send files in Zap workflows for file object and file URL requirements.
- Zapier: Ways to make API requests for API request options and credential handling.
- Zapier: Connect your app accounts for downstream app connections.


