Coda
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 Coda account — sign up for free, no credit card required.
Use Case 1: Generate PDFs from Table Data
Use a button in a Coda table to trigger an automation rule that calls PolyDoc via HTTP and writes the PDF link back to the row.Button press → Automation rule → HTTP Pack action → PolyDoc API → Update row
Set up your table
Create a table in your Coda doc with the columns your PDF template requires (e.g. customer_name, invoice_number, amount). Add a Button column that will trigger PDF generation, and a URL column to store the resulting PDF link.
/img/guides/coda/coda-uc1-table-setup.pngCreate an automation rule with a button trigger
Go to Automations and create a new rule. Set the trigger to When a button is pressed and select the button column from your table.
/img/guides/coda/coda-uc1-automation-rule.pngAdd an HTTP action for PolyDoc
Add an action step using the HTTP Pack (or a custom Pack). Configure:
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
Authorization=Bearer YOUR_API_KEY(get from the Dashboard),X-Sandbox=true - Body: JSON with formulas referencing the triggering row's columns to populate your PolyDoc template.
/img/guides/coda/coda-uc1-http-action.pngStore the PDF link in the row
Add a Modify row action after the HTTP step. Write the PDF URL from the PolyDoc response into the row's URL column. Click the button on a test row to verify the link appears and the PDF downloads correctly.
/img/guides/coda/coda-uc1-store-link.pngUse Case 2: Automated PDF on New Row
Automatically generate and email a PDF every time a new row is added to a Coda table.New row added → Automation rule → HTTP request (PolyDoc) → Email
Create an automation rule with a New Row trigger
Open Automations and create a new rule. Set the trigger to When a new row is created and select your target table.
/img/guides/coda/coda-uc2-new-row-trigger.pngAdd an HTTP request step for PolyDoc
Add an HTTP Pack action step. Use the same PolyDoc configuration as Use Case 1 — map the new row's columns to your template fields in the JSON body.
/img/guides/coda/coda-uc2-http-request.pngAdd an email step
Add a Gmail (or email Pack) action. Set the recipient to the row's email column, add a subject line, and attach the PDF binary data from the previous step.
/img/guides/coda/coda-uc2-email-step.pngTest with a new row
Add a test row to the table and confirm the email arrives with the correct PDF attached. Once verified, the automation runs for every new row going forward.