Budibase
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 Budibase account — sign up for free, no credit card required.
Use Case 1: Generate PDFs from App Data
Trigger a PDF download from a Budibase app screen using a button bound to a REST API query that calls PolyDoc.Button click → REST API query (PolyDoc) → Download PDF
Add a REST API data source
Open your Budibase app and navigate to Data. Click Add source and select REST API. Name the data source (e.g. PolyDoc).
Under Headers, add a default header: Authorization with value Bearer YOUR_API_KEY (get your API key from the Dashboard).
/img/guides/budibase/budibase-uc1-add-rest-source.pngConfigure the PolyDoc endpoint
Inside the PolyDoc data source, click Add query and configure:
- Method: POST
- URL:
https://api.polydoc.tech/pdf/convert - Headers: add
X-Sandbox=true(for testing without counting against your quota) - Body: select JSON and map your table fields to a PolyDoc template. Use Bindings to reference row data dynamically.
/img/guides/budibase/budibase-uc1-configure-endpoint.pngCreate a screen with a generate button
Go to Design and open (or create) a screen. Add a Table component bound to your data table, then add a Button component to each row.
In the button's On click action, choose Execute query and select the PolyDoc query you created. Use Bindings to pass the current row's fields as query parameters.
/img/guides/budibase/budibase-uc1-screen-button.pngHandle the PDF response
The PolyDoc API returns binary PDF data. In the query settings, set the Transformer to convert the response into a downloadable blob URL. Use a subsequent Navigate to action on the button to open the URL and trigger the download.
/img/guides/budibase/budibase-uc1-handle-pdf.pngUse Case 2: Automated PDF on Row Creation
Automatically generate and email a PDF whenever a new row is added to a Budibase table, using the built-in Automations engine.Automation: Row Created → External REST API (PolyDoc) → Send Email
Create an automation with a Row Created trigger
Navigate to Automations and click Create automation. Select the Row Created trigger and choose the table you want to monitor.
/img/guides/budibase/budibase-uc2-row-created-trigger.pngAdd an External REST API action
Click Add step and select External REST API. Configure:
- Method: POST
- URL:
https://api.polydoc.tech/pdf/convert - Headers:
Authorization=Bearer YOUR_API_KEY,X-Sandbox=true - Body: JSON mapping the trigger row's fields to your PolyDoc template using Bindings.
/img/guides/budibase/budibase-uc2-rest-api-step.pngAdd a Send Email action
Add another step: Send Email. Map the recipient to the row's email field and attach the PDF response from the previous step.
/img/guides/budibase/budibase-uc2-send-email.pngTest the automation
Click Test automation to run it with sample data. Verify the PDF arrives by email. Once confirmed, toggle the automation ON to activate it for all future rows.