Activepieces
Prerequisites
- A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
- An Activepieces account — sign up for free, or self-host the open-source edition.
Use Case 1: Generate PDFs from Spreadsheet Data
Generate an invoice PDF for every new row added to a Google Sheet and send it via email.Google Sheets piece (new row) -> HTTP piece (PolyDoc API) -> Gmail piece
Prepare your data source
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 |
Create a flow and add the trigger
In the Activepieces dashboard, click New Flow. Set the trigger to Google Sheets → New Row. Connect your Google account, select the spreadsheet and the invoices tab, then click Test trigger to verify the sample row is detected.
/img/guides/activepieces/activepieces-uc1-create-flow.pngAdd the HTTP piece
Add an HTTP → Send Request action after the trigger and configure:
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
- Body: JSON mapping the spreadsheet columns to your PolyDoc template fields
/img/guides/activepieces/activepieces-uc1-http-piece.pngAdd an output piece
Add a Gmail → Send Email action (or Google Drive, Slack, etc.). Map the HTTP response body as the attachment data, set the filename from invoice_number (e.g. invoice-INV-2026-001.pdf), and fill in the recipient from customer_email on the row.
/img/guides/activepieces/activepieces-uc1-output-piece.pngTest and publish the flow
Click Test flow to run the entire chain with the sample row. Verify the PDF arrives, then click Publish to activate the flow.
/img/guides/activepieces/activepieces-uc1-publish-flow.pngUse Case 2: Webhook-Triggered PDF Generation
Accept incoming JSON via a webhook, generate a PDF, and email it — ideal for form submissions, CRM events, or custom app integrations.Webhook trigger -> HTTP piece (PolyDoc API) -> Email piece
Add the webhook trigger piece
Create a new flow and set the trigger to Webhook → Catch Hook. Copy the generated webhook URL.
/img/guides/activepieces/activepieces-uc2-webhook-trigger.pngSend test data to the webhook
Send a test POST request to the webhook URL with sample JSON (e.g. using cURL or your form platform). Click Test trigger in Activepieces so it learns the payload structure.
/img/guides/activepieces/activepieces-uc2-test-webhook.pngAdd the HTTP piece for PolyDoc
Add an HTTP → Send Request action. Configure it the same way as in Use Case 1, but map the webhook payload fields instead of spreadsheet columns.
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
Authorization,Content-Type,X-Sandbox - Body: JSON with the webhook data mapped to your template fields
/img/guides/activepieces/activepieces-uc2-http-piece.pngDeliver the PDF
Add a Send Email action to deliver the PDF. Test the full flow, then Publish. Every incoming webhook request will now generate and send a PDF automatically.
/img/guides/activepieces/activepieces-uc2-deliver-pdf.png