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_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 |
| invoice_number | quantity | name | description | price | original_price |
|---|---|---|---|---|---|
| INV-2026-001 | 1 | Web Design Services | Custom website design and development for company homepage | 800 | |
| INV-2026-001 | 1 | Logo Design | Professional logo design with 3 revision rounds | 300 | |
| INV-2026-001 | 1 | SEO Optimization | Search engine optimization for 10 target keywords | 100 | 150 |
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_numberequals the trigger record'sinvoice_numberfield chip.
Then click + Add action again and choose HTTP Request. Configure:
- Method: POST
- URL:
https://api.polydoc.tech/pdf/convert - Headers:
Authorization:Bearer YOUR_API_KEY(get your key from the PolyDoc Dashboard).Content-Type:application/jsonX-Sandbox:true
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, optionallyoriginal_price) must match what your template expects. Rename them ininvoice_line_itemsif 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>" } }, sodata.urlis 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.
Use Case 2: Email the PDF link to the customer
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_emailfield chip from the trigger record. - Subject: Invoice followed by the
invoice_numberchip. - Body: Your invoice is ready. Download it here: followed by the previous HTTP Request's
data → urlchip. 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.