Skip to main content

Teable

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 cloud storage connection configured in the PolyDoc Dashboard - Teable automations cannot pass binary files between actions, so PolyDoc uploads the PDF and returns a URL instead.
  • A Teable workspace - self-hosted (free) or Teable Cloud.

Use Case 1: Save PDF URL to record on creation

Generate an invoice PDF whenever a new record is created in the invoices table, then save the resulting download URL back to that record.
Record Created → Get Records (line items) → HTTP Request (PolyDoc) → Update Record (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

Add two more Text columns 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

In the left sidebar, click + Create and choose New automation. Pick When record is created as the trigger and select the invoices table.

Add the HTTP Request action

Click + Add action and choose Get Records. Configure:

  • Table: invoice_line_items
  • Filter: invoice_number equals the trigger record's invoice_number field chip.

Then click + Add action again and choose HTTP Request. Configure:

  • Method: POST
  • URL: https://api.polydoc.tech/pdf/convert
  • Headers:

For the Body, use the JSON below as a starting point. In Teable's body editor, position the cursor where each placeholder sits and click the + button to insert the corresponding field chip from the trigger record (or, for items, from the Get Records output):

{
"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": <Get Records 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 chip inside the existing quotes.
  • Number (invoice_subtotal, invoice_tax_rate, invoice_tax_amount, invoice_total): insert the chip with no surrounding quotes, so the API receives a JSON number, not a stringified number.
  • Date strings (invoice_date, invoice_due_date): Teable date columns serialise as ISO strings (YYYY-MM-DD), so insert the chip inside quotes.
  • Array (items): replace the placeholder with the entire Get Records output chip. Teable inserts the array in JSON-safe form. 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.

Add the Update Record action

Click + Add action again and choose Update Record. Select the invoices table, set the record to the trigger record, and map:

  • Field: pdf_url
  • Value: open the + menu, pick the previous 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 using the switch at the top of the automation editor. Create a test record in the invoices table (with a fresh presigned_url), then refresh the row. The pdf_url field should be populated within a few seconds. Open the Run history panel to inspect each action's output if something goes wrong.

Email the generated PDF link to the customer as soon as the invoice is created, using Teable's native Send Email action chained after the HTTP Request.
Record Created → Get Records → HTTP Request (PolyDoc) → Send Email

Reuse the trigger and HTTP Request action

Create a new automation (or extend the one from Use Case 1). Use the same Record Created trigger on invoices, the same Get Records step, and the same HTTP Request step as Use Case 1, Steps 2 and 3.

Add the Send Email action

After the HTTP Request action, click + Add action and choose Send Email. Configure:

  • To: insert the customer_email field chip from the trigger record.
  • Subject: Invoice followed by the invoice_number chip.
  • Body: Your invoice is ready. Download it here: followed by the previous HTTP Request's data → url chip. Same field path as Use Case 1 Step 4.

Enable and test

Toggle the automation On. Create a test record and verify that the customer email arrives with the PDF download link. The Run history panel surfaces the response body of each action if a run fails.