Skip to main content

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_numberinvoice_dateinvoice_due_dateinvoice_subtotalinvoice_tax_rateinvoice_tax_amountinvoice_totalcustomer_namecustomer_emailcustomer_streetcustomer_citycustomer_country
INV-2026-0012026-01-152026-02-1412000.11201320John Doejohn.doe@example.com456 Customer AvenueBeautiful CityUK

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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc1-create-flow.png

Add the HTTP piece

Add an HTTP → Send Request action after the trigger and configure:

  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Headers:
    • Authorization: Bearer YOUR_API_KEY (get from the Dashboard)
    • Content-Type: application/json
    • X-Sandbox: true
  • Body: JSON mapping the spreadsheet columns to your PolyDoc template fields
Screenshot placeholder: /img/guides/activepieces/activepieces-uc1-http-piece.png

Add 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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc1-output-piece.png

Test 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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc1-publish-flow.png

Use 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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc2-webhook-trigger.png

Send 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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc2-test-webhook.png

Add 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
Screenshot placeholder: /img/guides/activepieces/activepieces-uc2-http-piece.png

Deliver 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.

Screenshot placeholder: /img/guides/activepieces/activepieces-uc2-deliver-pdf.png