webcapture Get a free key

Convert HTML to PDF from n8n

Wire n8n's HTTP Request node to POST a url to /v1/convert with a Bearer key, then fetch the download url the receipt returns.

Wire it up

The shared request is Authorization: Bearer wc_your_key and {"url": "https://example.com/"}. n8n changes the wrapper, not those values or the authenticated download.

  1. Add an HTTP Request node. Set Method to POST and URL to your serving origin plus /v1/convert.
  2. Set Authentication to Generic Credential Type, then Header Auth, and save a credential with name Authorization and value Authorization: Bearer wc_your_key. The key lives in the stored credential, not in the node.
  3. Turn Send Body on, set Body Content Type to JSON, and put the request in the JSON field: {"url": "https://example.com/"}.
  4. Run the node once. The output is the sync receipt: id, bytes, attempts, remaining, sourceUrl, sourceType, and download.
  5. Add a second HTTP Request node: Method GET, URL {{ $json.download }}, carrying the same Header Auth credential as the first node. The download endpoint is key-scoped: without the header it answers 401, and another key's id answers 404. Its output is the pdf bytes.

The full request

Method:  POST
URL:     https://webcapture.io/v1/convert
Authentication: Header Auth
  Name:  Authorization
  Value: Bearer wc_your_key
Send Body: on, Body Content Type: JSON
JSON:    {"url": "https://example.com/"}

The response is a JSON receipt, not the bytes. Point a second HTTP Request node at the download value with the same Header Auth credential as the first, and the finished document arrives in the workflow's binary output, one render per document counted against the key's quota. The download endpoint is key-scoped: it answers 401 without the Authorization header and 404 for another key's id, so the download url is not a shareable link. If an earlier node already builds an invoice or report as HTML, send {"html": "<html>…</html>"} instead of url; add baseUrl when relative images or stylesheets need a public origin.

Limits

The convert endpoint rate limits at 120 requests a minute per client IP; over the window the answer is 429 with a retryAfterSec field. The account's monthly quota is separate: an exhausted quota answers 429 carrying used, limit, resetDate, and upgradeUrl, and every receipt's remaining field shows the count after that render. If the workflow's execution timeout is tight, POST with ?wait=false: the 202 ticket carries poll and download urls a later node can fetch.

Related

Method

Checked 2026-10-05 against n8n: The node's parameter names follow n8n's HTTP Request node documentation. Source: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/. Corrections: hello@webcapture.io.

Get a free key or read the API reference to wire n8n.