Skip to main content

Bubble.io

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 Bubble.io account — sign up for free, no credit card required.

Use Case 1: Generate PDFs from App Data

Let users click a button in your Bubble app to generate and download a PDF from their data, using the API Connector plugin.
Button click -> API Connector (PolyDoc API) -> Display/download PDF

Install the API Connector plugin

Go to Plugins → Add plugins and install the API Connector plugin (free, built by Bubble). Open its settings and click Add another API.

Screenshot placeholder: /img/guides/bubble/bubble-uc1-install-plugin.png

Configure the PolyDoc API call

Configure a new API call inside the API Connector:

  • Name: PolyDoc - Generate PDF
  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Use as: Action
  • Headers:
    • Authorization: Bearer YOUR_API_KEY (get from the Dashboard)
    • Content-Type: application/json
    • X-Sandbox: true
  • Body: JSON with dynamic fields (wrap Bubble data in <param> tags)

Click Initialize call to test the connection.

Screenshot placeholder: /img/guides/bubble/bubble-uc1-api-connector.png

Create a button workflow

Add a button to your page. Open its workflow and add the action Plugins → PolyDoc - Generate PDF. Map the dynamic parameters to the current Thing's fields.

Screenshot placeholder: /img/guides/bubble/bubble-uc1-button-workflow.png

Handle the PDF response

After the API action, add a Download file step (or open the PDF in a new tab). Preview the app, click the button on a test record, and verify the PDF downloads correctly.

Screenshot placeholder: /img/guides/bubble/bubble-uc1-download-pdf.png

Use Case 2: Automated PDF on New Record

Automatically generate a PDF whenever a new Thing is created in your database, using a backend workflow.
Backend workflow trigger -> API Connector (PolyDoc) -> Save PDF URL

Enable backend workflows

Go to Settings → API and enable Backend workflows. Then open the Backend workflows editor from the main menu.

Screenshot placeholder: /img/guides/bubble/bubble-uc2-enable-backend.png

Create a trigger for new Things

Create a new backend workflow. Add a trigger that fires when a specific Thing type is created (e.g. Invoice or Order). Define the workflow parameters to accept the new Thing.

Screenshot placeholder: /img/guides/bubble/bubble-uc2-trigger.png

Add the PolyDoc API Connector action

Add the PolyDoc - Generate PDF API Connector action (configured in Use Case 1). Map the Thing's fields to the API parameters.

Screenshot placeholder: /img/guides/bubble/bubble-uc2-api-action.png

Save the PDF URL to the record

Add a Make changes to a Thing action after the API call to save the PDF URL back to the record. Create a test record and verify the PDF URL is populated automatically.

Screenshot placeholder: /img/guides/bubble/bubble-uc2-save-url.png