Skip to main content

Baserow

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 Baserow workspace on version 2.0 or later (free Cloud tier or self-hosted) - the Automations builder and its Send HTTP request action are required.
  • Your own cloud storage bucket (S3, GCS, Azure Blob, R2, Wasabi, …) and a way to generate presigned PUT URLs - Baserow automations cannot pass a binary PDF between actions, so PolyDoc uploads the PDF to a presigned URL you supply and returns the object URL. See the cloud storage guide.

Use Case 1: Save PDF URL to row on creation

Generate an invoice PDF whenever a new row is added to the invoices table, then save the resulting download URL back to that row.
Rows are created → List multiple rows (line items) → Send an HTTP request (PolyDoc) → Update a row (save PDF URL)

Set up your tables

Use invoices (one row per invoice) and invoice_items (line rows linked by invoice_number). Examples below - two tabs in Sheets; two tables or linked records elsewhere.

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
invoice_numberquantitynamedescriptionpriceoriginal_price
INV-2026-0011Web Design ServicesCustom website design and development for company homepage800
INV-2026-0011Logo DesignProfessional logo design with 3 revision rounds300
INV-2026-0011SEO OptimizationSearch engine optimization for 10 target keywords100150

In Baserow, create the two tables above in a database (the Paste table data import is the quickest way). Then add two more Text fields to the invoices table:

  • presigned_url: a presigned PUT URL for your bucket, one per invoice row, populated by the script that creates the row.
  • pdf_url: left empty; the automation writes the PolyDoc response URL here.

Create the automation trigger

Open the database and click Add new… Automation (or the + next to Automations in the sidebar). Pick Rows are created as the trigger, then set Integration to Local Baserow, Database to your database, and Table to invoices. Click Test event and create a row (or use an existing one) so the trigger captures a sample payload — later steps reference its fields.

baserow.io

Add the List multiple rows and Send an HTTP request actions

Click the + under the trigger and add a List multiple rows action. Point it at the invoice_line_items table, open Refinements → Filter, and add Where invoice_number is — then use Use a formula for this filter and pick the trigger row's invoice_number (Rows are created → 0 → invoice_number). This collects the line items for the new invoice.

Add a second action and choose Send an HTTP request. Configure:

  • HTTP method: POST
  • Endpoint URL: https://api.polydoc.tech/pdf/convert
  • Headers:
  • Body type: Raw

In the Body content editor, type the JSON below and use dynamic data (the field picker that opens on focus, or the get formula in expert mode) to insert each value:

{
"source": "[template:YOUR_TEMPLATE_ID]",
"templateData": {
"invoice_number": "<invoice_number field>",
"invoice_date": "<invoice_date field>",
"invoice_due_date": "<invoice_due_date field>",
"invoice_subtotal": <invoice_subtotal field>,
"invoice_tax_rate": <invoice_tax_rate field>,
"invoice_tax_amount": <invoice_tax_amount field>,
"invoice_total": <invoice_total field>,
"customer_name": "<customer_name field>",
"customer_email": "<customer_email field>",
"customer_street": "<customer_street field>",
"customer_city": "<customer_city field>",
"customer_country": "<customer_country field>",
"items": <List multiple rows output>
},
"cloudStorage": {
"presignedUrl": "<presigned_url field>"
}
}

Group the bindings by field type when wiring them in:

  • Text (invoice_number, customer_name, customer_email, customer_street, customer_city, customer_country): insert the field inside the existing quotes — for example Rows are created → 0 → customer_name.
  • Number (invoice_subtotal, invoice_tax_rate, invoice_tax_amount, invoice_total): insert the field with no surrounding quotes, so the API receives a JSON number, not a stringified number.
  • Date strings (invoice_date, invoice_due_date): Baserow date fields serialise as ISO strings (YYYY-MM-DD), so insert the field inside quotes.
  • Array (items): replace the placeholder with the entire List multiple rows output (no quotes). The line-item field names (quantity, name, description, price, optionally original_price) must match what your template expects — rename them in invoice_line_items if needed.
baserow.io

Add the Update a row action

Add a third action and choose Update a row. Point it at the invoices table, set Row ID to the trigger row's id (Rows are created → 0 → id), and map the pdf_url field:

  • Field: pdf_url
  • Value: from the dynamic-data picker, pick the previous Send an HTTP request output, then drill into data → url. PolyDoc returns { "data": { "url": "<your-presigned-url-without-querystring>" } }, so data.url is the permanent object URL in your bucket.

Enable and test

Toggle the automation On (the Draft switch at the top of the editor) and Publish it. Create a test row in the invoices table with a fresh presigned_url, then refresh the row — the pdf_url field should be populated within a few seconds. Use Test event on each action, or the History tab, to inspect inputs and outputs if a run fails.

Email the generated PDF link to the customer as soon as the invoice is created, using Baserow's native Send an email action chained after the HTTP request.
Rows are created → List multiple rows → Send an HTTP request (PolyDoc) → Send an email

Reuse the trigger and HTTP request

Create a new automation (or extend the one from Use Case 1). Use the same Rows are created trigger on invoices, the same List multiple rows action, and the same Send an HTTP request action as Use Case 1, Steps 2 and 3.

Add the Send an email action

After the Send an HTTP request action, add another action and choose Send an email. Configure:

  • To: insert the customer_email field (Rows are created → 0 → customer_email).
  • Subject: Invoice followed by the invoice_number field.
  • Body: Your invoice is ready. Download it here: followed by the previous Send an HTTP request's data → url value. Same field path as Use Case 1 Step 4.

Enable and test

Toggle the automation On and Publish it. Create a test row and verify that the customer email arrives with the PDF download link. The History tab surfaces the response body of each action if a run fails.