How to generate a PDF in Zapier, no HTML needed

A five-minute setup that turns any Zap trigger (a Stripe payment, a form response, a new spreadsheet row) into a branded PDF invoice, certificate or quote, ready to email or store.

Guide · Works on any Zapier plan that includes Webhooks by Zapier

What you'll need

Step by step

  1. Pick your trigger. For example, Stripe → New Payment or Google Sheets → New Spreadsheet Row. Test it so Zapier has sample data to map.
  2. Add an action: Webhooks by Zapier → Custom Request. Set Method to POST and URL to https://pdfmintapi.com/v1/generate.
  3. Add two headers: Authorization = Bearer pm_your_key and Content-Type = application/json.
  4. Paste this into Data, then replace the values with fields from your trigger using Zapier's insert-data button:
    {
      "template": "invoice",
      "response_format": "url",
      "filename": "INV-{{invoice number}}",
      "data": {
        "invoice_number": "{{invoice number}}",
        "date": "{{date}}",
        "currency": "$",
        "from": { "name": "Your Company" },
        "to": { "name": "{{customer name}}", "email": "{{customer email}}" },
        "items": [{ "name": "{{description}}", "qty": 1, "amount": "{{amount}}" }],
        "total": "{{amount}}"
      }
    }
    "response_format": "url" makes PDFMint return JSON with links instead of a raw file, which Zapier's later steps can use much more easily.
  5. Test the step. The response contains pdf_url (a direct link to the PDF file) and view_url (a tracked link that tells you when it's opened).
  6. Add a Gmail (or Outlook) step. Put view_url in the email body. When your customer opens it, your PDFMint dashboard shows Opened. To attach the file instead, use pdf_url as the attachment. Attached files can't report opens, though.

Fixing "Field 'data' must be a JSON object"

This is the most common Zapier error with PDF APIs. Zapier's form fields hold plain text, so nested JSON is often sent as one quoted string instead of an object. Many APIs reject that.

PDFMint accepts both. If data or options arrives as a string containing valid JSON, it's parsed automatically. If you still see the error, the JSON inside the string is broken. The usual cause is a mapped field containing an unescaped quote mark, such as a customer named Joe "JJ" Smith. Wrap that field with Zapier's Formatter → Text → Replace to remove the quotes.

Don't want the built-in invoice look?

Describe the document you want in one sentence, such as "a certificate with a gold border and a seal", and Magic Templates builds a reusable template in about a minute. Then use "template": "custom:your-name" in step 4. You never touch HTML.

Built-in templateGood for
invoicePayments, retainers, client billing
receiptOrder confirmations, donations
certificateCourse completions, event attendance
reportWeekly KPIs, client reports
packing-slipE-commerce fulfilment

Sample data for every template: /v1/templates. Full field reference: API docs.

Build your first PDF Zap

Free tier: 100 PDFs a month, tracking included, no credit card.

Get your free API key →