/// INTEGRATION

PDF generation in your Zaps.

Turn any Zapier trigger — a form response, a new row, a paid invoice — into a finished PDF with one Webhooks by Zapier step.

Works today with Zapier's built-in Webhooks by Zapier — nothing to install

Prerequisites

Test the key before building anything:

curl https://www.ashdocs.com/api/v1/me -H "X-API-Key: ash_live_..."

Setup, step by step

  1. 1

    Add the webhook action

    Add an action step, choose “Webhooks by Zapier”, and select the “Custom Request” event.

  2. 2

    Set the method and URL

    Method: POST. URL: the tool endpoint.

    https://www.ashdocs.com/api/v1/tools/html-to-pdf
  3. 3

    Add the headers

    In the Headers section add two rows: “X-API-Key” with your key, and “Content-Type” with “application/json”.

  4. 4

    Build the JSON data

    In Data, write the JSON body and insert trigger fields where you need them. Always include "output": "url" so the response is a flat file_url Zapier can map.

    {"html": "<h1>Invoice {{invoice_no}}</h1><p>{{customer_name}}</p>", "options": {"format": "A4", "output": "url"}}
  5. 5

    Test and map the file_url

    Run the test — the response contains file_url. Map that field into Google Drive, Gmail or Dropbox steps; those apps download the URL automatically when creating files or attachments.

Files in

When the trigger app provides a downloadable file link (an attachment URL, a hosted upload), send it as “file_url” in the JSON body to any file tool — the API fetches it server-side, so Zapier never has to handle the bytes.

Files out

Always request "output": "url" in options. The response is a flat JSON body with file_url — a signed link that expires after 60 minutes — plus expires_at and credits_charged. Zapier's Drive/Gmail/Dropbox actions accept the URL directly.

Zapier webhooks are strongest for generating documents from trigger data (html-to-pdf, invoice-pdf) and extracting from hosted files via file_url. For heavy file-in/file-out manipulation chains, the Make and n8n patterns handle binaries more naturally — see those pages.

Popular recipes

Build each Zap from the numbered steps — every step uses stock Zapier apps.

Form response → PDF → Gmail

~10 min setup

Each form submission becomes a finished PDF attached to an email.

  1. Trigger: Typeform / Google Forms “New Response”.
  2. Action: Webhooks by Zapier Custom Request — POST https://www.ashdocs.com/api/v1/tools/html-to-pdf with the form fields in the HTML and "output": "url".
  3. Action: Gmail “Send Email” — map file_url as the attachment.

New Sheets row → invoice PDF → Drive

~10 min setup

Every new spreadsheet row is rendered into an invoice PDF filed in Google Drive.

  1. Trigger: Google Sheets “New Spreadsheet Row”.
  2. Action: Webhooks by Zapier Custom Request — POST https://www.ashdocs.com/api/v1/tools/html-to-pdf with row values in the HTML body.
  3. Action: Google Drive “Upload File” — map file_url as the file.

Async: post finished jobs to Slack

~15 min setup

Long-running jobs notify a Slack channel the moment they finish — no timeouts.

  1. Trigger: Webhooks by Zapier “Catch Hook” — copy the hook URL.
  2. Register it once with the ASHDOCS webhook API:
  3. curl -X POST https://www.ashdocs.com/api/webhooks \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url": "https://hooks.zapier.com/hooks/catch/...", "events": ["job.completed"]}'
  4. Action: Slack “Send Channel Message” — map outputs[].url from the webhook payload. Use this pattern for any job too slow for a synchronous Zap step.

Troubleshooting

SymptomFix
The response is an unusable JSON blob / no file appearsAdd "output": "url" inside options and map the flat file_url field — Zapier steps download URLs, not raw binaries.
The webhook step is unavailableWebhooks by Zapier is a premium app — it requires a paid Zapier plan.
401 UnauthorizedThe key goes in the X-API-Key header — not in the query string and not as a Basic Auth username.
Timeout on big documentsSwitch to the async pattern: register a job.completed webhook pointing at a Catch Hook trigger and let a second Zap handle the result.

Frequently asked questions

Is there an ASHDOCS app in the Zapier directory?

The API works through Webhooks by Zapier today — a standard Custom Request step with two headers, documented on this page. Everything on this page works right now with no app to install.

Why URLs instead of files?

Zapier steps pass fields, not binary streams. A signed URL is a field every downstream app understands: Drive, Gmail and Dropbox all download it automatically when creating files or attachments.

Does the free ASHDOCS tier work with Zapier?

Yes — the free tier's 100 monthly credits work through Zapier exactly as they do via curl, and ash_test_ sandbox keys let you build the Zap without consuming any credits. Note that Webhooks by Zapier itself requires a paid Zapier plan.

How do I secure the returned URLs?

Every file_url is signed and expires after 60 minutes. It cannot be guessed, cannot be reused after expiry, and grants access to that single file only — treat it like a temporary download token.

Tools used on this page