Fill a PDF form from Bubble with the API Connector

Fill a fillable PDF from your Bubble database with the API Connector: set up the call, map fields to dynamic values, save the filled file, and handle errors cleanly.

A Bubble API Connector call that fills the fields of a PDF form

A common Bubble request: "the client sends us a PDF form, and we want to fill it from the data users enter in our app". You do not need a PDF plugin for that. The PDF Form Fill API is one API Connector call.

1. Find the field names

Upload the blank form somewhere public, or to Bubble's file storage, and read its fields once. In the API Connector, create a call:

  • Name: PDF form fields, use as Action, data type JSON.
  • POST https://api.justapi.tech/v1/pdf/form-fields
  • Header Authorization: Bearer ak_live_... (mark it private).
  • Body:
{ "source": { "url": "<form_url>" } }

Initialize it. The response lists each field's name, type and options. Write them down. This call is free.

2. Set up the fill call

Create a second call, Fill PDF form, also as an Action:

  • POST https://api.justapi.tech/v1/pdf/form-fill
  • Body, with Bubble parameters in angle brackets:
{
  "source": { "url": "<form_url>" },
  "options": {
    "fields": { "full_name": "<full_name>", "email": "<email>", "agree": <agree> },
    "flatten": true
  }
}

Untick "Quote the value" style issues by keeping your own quotes: text parameters go inside quotes in the body, and the checkbox parameter <agree> goes without quotes so Bubble sends true or false.

3. Use it in a workflow

In the workflow that submits the form:

  1. Fill PDF form, with form_url set to your template file's URL and each parameter mapped to the field in your database.
  2. Make changes to a thing: save Result of step 1's result url to a file field, or send it in an email.

The result URL is valid for 24 hours. To keep the file longer, save it into Bubble storage with a "Save file" plugin step, or download it in your backend workflow.

4. Handle errors

Turn on "Include errors in response and allow workflow actions to continue" for the call. If a value does not fit its field, for example a dropdown value that is not in the list, the API returns invalid_request with a message naming the field. Show it to the user, or log it. Failed calls are not charged.

Bubble specifics

  • Bubble file URLs start with //. Prefix https: in the body: https:<form_url>.
  • Dates go in as text, formatted the way the form expects, like 11/05/2026. Use Bubble's :formatted as.
  • Field names are case sensitive and sometimes contain dots, like form1.name. Copy them exactly.

Cost

Reading fields is free. Each fill is $0.006 at the first tier. Test one form in the free PDF form filler before you build the workflow.