Stackby
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 Stackby account — sign up for free, no credit card required.
Use Case 1: Generate PDFs from Records
Automatically generate a PDF when a new row is added to a Stackby table, then store the PDF link in a column.Automation (new row) → API action → PolyDoc API → Update record
Set up your table with required columns
Open your Stack and add the columns your PDF template needs (e.g. customer_name, invoice_number, amount). Add a URL column called pdf_link to store the generated PDF link.
/img/guides/stackby/stackby-uc1-table-setup.pngCreate an automation triggered by a new row
Go to Automations and create a new automation. Set the trigger to When a new row is created and select your table.
/img/guides/stackby/stackby-uc1-automation-trigger.pngAdd an API action step for PolyDoc
Add an API action step and configure it:
- 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 row's column values to your PolyDoc template fields.
/img/guides/stackby/stackby-uc1-api-action.pngMap the PDF link back to a column
Add an Update row action after the API step. Map the PDF URL from the PolyDoc response into the pdf_link column. Add a test row to verify the link appears and the PDF downloads correctly.
Use Case 2: API Column for PDF Links
Use Stackby's API Column type to call PolyDoc directly from a cell — no automation required.API Column → PolyDoc API → Display PDF link in cell
Add an API Column to your table
In your table, click Add Column and choose API Column as the column type. This special column can call an external REST API and display the result in each cell.
/img/guides/stackby/stackby-uc2-api-column.pngConfigure the API Column for PolyDoc
Configure the API Column:
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
Authorization=Bearer YOUR_API_KEY,Content-Type=application/json,X-Sandbox=true
/img/guides/stackby/stackby-uc2-api-config.pngMap row fields into the request body
In the body template, reference other columns using Stackby's column-reference syntax to build the JSON payload. Each row's values are inserted automatically when the API Column refreshes.
/img/guides/stackby/stackby-uc2-body-mapping.pngVerify the auto-populated PDF link
Fill in a row with data and refresh the API Column. The cell auto-populates with the PDF link from PolyDoc. Click the link to verify the generated PDF.