Webhook logo
PDF.co logo

Workflow template

Create a PDF from webhook HTML

Create a PDF from HTML received in request.html through a webhook. Supply the output name in request.name; PDF.co returns a temporary PDF URL with synchronous processing configured.

How it works

From incoming HTML to a temporary PDF URL

1 Trigger · 1 Action
Webhook1 · Trigger

Incoming PDF.co request

Receive a nested request object containing html and name. The action processes the supplied HTML rather than fetching a web page URL or uploading a source File.

PDF.co2 · Action

Create a PDF from webhook HTML

Send request.html and request.name to PDF.co with async fixed to false. Return the generated PDF's temporary URL in the action output, without copying the file into permanent storage.

The result

A temporary PDF link for the supplied HTML

Example HTML-to-PDF webhook JSON

{ "request": { "html": "<h1>FICTIONAL FastHook example</h1>", "name": "fictional-example.pdf", "async": false } }

Included fictional HTML and output name. This is an incoming request example, not a generated download link. The returned PDF URL is temporary, so add storage if you need to keep the file.

Before activation

Set up your workflow

  1. Connect PDF.co and review the HTML

    Use your own PDF.co connection. Review the content and provider costs before submitting HTML for conversion; start with the fictional sample or your own controlled content.

  2. Prepare request.html and request.name

    Keep both fields inside the request object as shown. The action builds its JSON body from these fields and sets async: false. Configure webhook authentication before activation.

  3. Inspect the generated PDF before storing it

    Activate and submit one controlled request. Check the resulting temporary PDF URL and document content. Add an explicit download/storage step when the PDF needs to remain available.

Details and limitations
  • The source is HTML text, not a URL. Only request.html and request.name are read from the webhook. The prepared mapping does not fetch a page from request.url or upload a File.

  • The output link is temporary. This starter does not create a permanent public URL, save the PDF to Drive or email it. Retrieve/store the result separately when your process needs lasting access.

  • Processing mode and repeated requests matter. async is fixed to false in the action, regardless of incoming flags. Conversion consumes PDF.co credits; repeated requests or manual reruns can generate another PDF and use more allowance.

Questions about this template

What should the webhook request contain?

Send a nested request object with html and name, such as the fictional sample. The action converts HTML text rather than a source PDF, File upload or web page URL.

Is the returned PDF URL permanent?

No. It is temporary. Add a download or storage step if the PDF must remain available; this starter does not store or email it elsewhere.

Can the caller switch to asynchronous processing?

Not with these mappings. async is fixed to false in the action. Edit the action and add appropriate job handling if you need a different mode.

Will rerunning the same HTML use more credits?

It can. Each accepted request or manual rerun can create another PDF. Review content, provider costs and webhook authentication before activation and larger volumes.

Explore connected apps

App integrations