Possible Bubble limitations / dead-ends?

Let me try to give you an example… Let’s say my app sells plane tickets for multiple airlines… My client is a company not a regular person. That company has multiple users… Once they register into my system I now have to manage all their current and past travels. So I need to do a couple of things:

  1. Access my client’s account on each of the airline company that I work with (using the airline API to do that)

  2. Pull every user that flew with those companies.

  3. Start creating a centralized “passenger history” on my app so you can type the name of the person and have all his/ hers travel information regardless the airline company.

  4. After I have all the companies passengers/ employees now I need to query the airline’s API and get things like “flying info” ( departure from/ arrived where), “payment history”, “extra purchases” (extra luggage, premium seats etc).

So… this is just a very basic scenario where my data isn’t ready to be loaded in Bubble and I need to orchestrate multiple APIs endpoints in order to build a centralized passenger information. Going back to our main topic that is when things start to get duplicated or missing.

Of course I just gave you a basic example… our actual app runs against 15 different endpoints over 3.000 times to setup 1 account. : )

That’s why I think Data API couldn’t help us… Am I wrong?

I believe the Data API can help with this, but my business partner @kramwe has a much better understanding of the ins and outs of the data API so I’ll let her respond.

1 Like

How about using the Data API to bulk create new records, then do any needed updates / linking via a single recursive scheduled API workflow, which does its own check for more records.

This way, there’d be no issues with multiple writes to the same record.


I’m sorry @mishav I’m no quite following…

How can I “bulk create” new records if for every record I need specific (unique) information from a previous call… Getting the example that I gave above:

  1. Client’s Name: Whatever
  2. Employees: John, Anna, Cris
  3. Airline Companies: Delta, American, Southwest
  4. Origin: MIA, MCO, LAX, LAS
  5. Destination: MIA, MCO, LAX, LAS, LAG, HOS
  6. Cabin Type: Economy, Business, First Class
  7. Ticket Price: $$$

How can I bulk create that? If in order for me to discover how much did the ticket cost I first need to know the Employee Name, Airline Company, Origin, Destination and Cabin Type? I might be able to bulk create the 2nd or 3rd step using bulk create… but the more complex stuff aren’t there.

Am I interpreting Dara API wrong?

By the way… Bubble’s lack of documentation (for advanced stuff) and best practice guide is kinda frustrating.

Yes its tricky!

Imagine this API workflow, scheduled to run with a batch of 10 employees. Another workflow can run in parallel with a different batch, so long as they won’t both try to create or update the same rows, i.e. both attempt to create a cabin type record if it was missing.

Steps, guessing how you are allowed to batch the calls to the airlines …

1 . Set period end-date to now. Retrieve period start date from previous batch’s end-date.

2 . API call to airline 1 submit list of employee ids that match the airline system, query for trip history within period.

3 . Use results of API call to make a Data API bulk create trip history rows.

4 . Use results of Data API call to make further airline or bulk calls or database updates if needed.

5 . Store the period end-date for the batch

If the sequence breaks, you’re left with a batch incomplete, easiest choice is to delete the period’s incomplete trip history and let the next batch run reload it.

It would be interesting if the API workflow is sufficient to handle this complexity.

1 Like

Tks @mishav for the explanation… I’m starting to understand a bit more how I can achieve that using Data API.

One thing that I’m still struggling is this… Today If I wanna create a new thing something on Bubble from a third party I will use the “get data from external API”. So Bubble will do a GET on that external API and now I can (using API Workflow) work with that Data inside Bubble which is basically Bubble doing a POST on its data base.

Now… as far as I understand using the Data API I’ll be responsible to orchestrate the GET from the third party API and then do a POST (create) on Bubble trough Data API. Am I correct? If that’s the case I’ll need to do that programmatically out side Bubble right? If that is correct, can you share with me how are you currently “moving” the data from an external API and then POST that data on Bubble?


You know how to ask the difficult questions! : )

Normally yes, this level of manipulation would be outside the scope of API workflow functions, and need an external server to do.

Recently Bubble made server scripts available through plugins, and using this may be enough to get it done. I’m making a huge number of assumptions, there could be issues with each step. If it can’t be done, there is the fallback option of an external server.

Either way, its definitely coding!