Zapier
Prerequisites
- A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
- A Zapier account — sign up for free (free plan limited to 5 Zaps).
Use Case 1: Generate PDFs from Google Sheets
Automatically generate an invoice PDF from each new Google Sheets row and email it as an attachment.Google Sheets (new row) → Webhooks by Zapier (POST to PolyDoc) → Gmail (send email)
Create a new Zap
Log in to Zapier and click Create Zap. A Zap consists of a trigger ("when this happens") followed by one or more actions ("do this").
/img/guides/zapier/zapier-uc1-create-zap.pngAdd a Google Sheets trigger
Add a worksheet with column headers that match your PolyDoc template. The example below uses an invoices tab and one sample row; you can import data via File → Import (CSV/XLSX).
| invoice_number | invoice_date | invoice_due_date | invoice_subtotal | invoice_tax_rate | invoice_tax_amount | invoice_total | customer_name | customer_email | customer_street | customer_city | customer_country |
|---|---|---|---|---|---|---|---|---|---|---|---|
| INV-2026-001 | 2026-01-15 | 2026-02-14 | 1200 | 0.1 | 120 | 1320 | John Doe | john.doe@example.com | 456 Customer Avenue | Beautiful City | UK |
Set the trigger to Google Sheets → New Spreadsheet Row. Connect your Google account, select the spreadsheet and the invoices worksheet, then test the trigger to pull in a sample row.
/img/guides/zapier/zapier-uc1-sheets-trigger.pngAdd a Webhooks by Zapier POST action
Add an action: Webhooks by Zapier → POST. Configure:
- URL:
https://api.polydoc.tech/pdf/convert - Payload Type: JSON
- Headers:
Authorization=Bearer YOUR_API_KEY(get from the Dashboard),Content-Type=application/json,X-Sandbox=true - Data: map Google Sheets columns to your PolyDoc template fields using Zapier's field picker.
/img/guides/zapier/zapier-uc1-webhooks-post.pngAdd a Gmail action to send the PDF
Add another action: Gmail → Send Email. Map:
- To:
customer_emailfrom Google Sheets - Subject: e.g.
Invoice {{invoice_number}} - Attachment: use the response data from the Webhooks step
/img/guides/zapier/zapier-uc1-gmail-action.pngTest and turn on the Zap
Test each step individually using Zapier's step tester — verify the trigger pulls data, the webhook returns a PDF, and the email arrives. Once confirmed, click Turn on Zap.
Use Case 2: Catch Hook → PDF
Accept incoming data from any source via a Zapier webhook, generate a PDF, and deliver it by email.Webhooks by Zapier (Catch Hook) → Webhooks by Zapier (POST to PolyDoc) → Email
Create a Catch Hook trigger
Create a new Zap. Set the trigger to Webhooks by Zapier → Catch Hook. Zapier generates a unique webhook URL — copy it.
/img/guides/zapier/zapier-uc2-catch-hook.pngSend test data to the webhook
Send a test POST request to the webhook URL with sample JSON data matching your PDF template fields. Zapier uses this to learn the data structure and make fields available in subsequent steps.
/img/guides/zapier/zapier-uc2-test-data.pngAdd a POST action for PolyDoc
Add an action: Webhooks by Zapier → POST. Configure it the same way as Use Case 1 — URL, headers, and JSON body mapping the Catch Hook fields to your PolyDoc template.
/img/guides/zapier/zapier-uc2-post-polydoc.pngDeliver the PDF by email
Add an email action (Gmail, Outlook, or SMTP by Zapier). Attach the PDF from the previous step and set the recipient from the webhook data. Test the full Zap, then turn it on.