Hello fellow builders!
I have a quick question just to make sure I am undertsanding things correctly. So, as of today, the data API cannot be used to update (PATCH) many database things with a single call. Instead, to update many things the best way is to “schedule API workflow on a list of things”. Is this correct?
Thanks!
Using bubble built in functionality only, yes.
The Data API does Patch by Id - not by constraint which I think is what you are angling at. ChatGPT (etc) would do a great job of writing a little script to find all your ids and do the Patch calls. If you had a lot of data (eg millions of rows) and a lot of transformations, and wanted to orchestrate checks and audit trails it would be fun.
Point ChatGPT to the manual
or just use a backend workflow - but less fun. ![]()
Thanks Boston and Lindsay!
If I understand correctly, what you mean Lindsay is that if I have the unique ID, I have to make 1 PATCH call per unique ID, right? One single PATCH call cannot look like this (below) to be performed in bulk, right?
That is true. What is use case on this data? How often is it fetched, modified and how many entries would one user need to work with?
Thanks for the help Boston!
So the use case is I have a B2B marketplace with a few vendors signed up, and I need to track near real time their business’ stock levels to use that info accross my app.
To achieve this, my app is connected via inbound API to each vendor’s inventory management software. For each vendor, every 10 minutes I receive a JSON with updated stock information (the JSON only includes SKUs with changes in stock and most of the time a single JSON contains 50+ objects). I need to use that info to update the records in my database.
Based on my research, it seems the best solution is to receive the JSON in an API workflow, and then schedule an API workflow on a list of things which edits my database.
Does this seem like the correct solution?
Could be dependent on some other factors related to the data, the size of the data and number of users in need of utilizing the data. It is definitely the way for Legacy data modeling.
That to me sounds like My paid plugin Data Jedi could help dramatically reduce the costs of running an app like this, depending on a few other details regarding the data setup. It helps using a Hybrid Data Structure approach in which the api objects are saved to a single data entry as a list field. This allows for much cheaper data fetch as the main culprit with WU consumption for fetch is the number of items returned from the database.
I’ve provided multiple examples on the forum, but generally speaking each item returned from the database is 0.015 WUs, so a simple fetch of 50 items is only 0.75 WUs, now, do that once every 10 minutes (assuming making changes to all 50 every 10 minutes 24/7 and needing to keep synced) that could end up costing 4.5 WU per hour for fetch, plus the make changes to thing charges per thing of 0.5 (25WU) times 6 per hour for 150 WU per hour. Add in the costs to schedule the backend workflows of 0.1 plus the action that does the schedule of 0.5 and you’ve got another 180 WUs per hour. That is 334.5 WU per hour.
If using my plugin and a Hybrid data structure approach it would cost 0.015 per fetch, plus a single make changes to thing charge of 0.5 and a single schedule of backend workflow action of 0.6, so 6.69 in total per hour.
The way my plugin allows you to save disgusting amounts of WUs is that the plugin will accept a single client side action of modifying all api objects based on the incoming list (there is also a corresponding server side action for this - it spits out 4 lists, unchanged, new, changed, and all - allows for extra data insights that are worth $$$ to businesses), and will change only the key values present based on the ID keys provided.
If doing some top of mind math on this:
Legacy approach with one vendor, running changes every 10 minutes on 50 items for a month = roughly 240,840 WUs
Hybrid data structure approach with Data Jedi, with one vendor running changes every 10 minutes on 50 objects for a month = roughly 4,816 WUs which is around 98% cheaper
The plugin has lots of other features and elements that do more stuff as well, so it is not just about cheaper WUs for fetching, creating or modifying data.
However, if you want to use the Legacy approach to data structuring and schedule API workflows on a list of things, I think the approaches you found are likely the best there is for built in bubble functions and features. The concept of creating a plugin for running bulk update api calls will reduce the costs a bit, as it will remove the need for the scheduling of backend workflows, but still incurs costs of the make changes to thing and use of the API.
Sounds like a very powerful plugin. I have taken a look and it seems like it really saves WU. I think the challenge is learning how to use it, I guess it is worth the time!
Most challenging part of how to use it, is to ensure proper JSON structure. When I first got started with JSON I thought it was intimidating, but after a couple of weeks, I understood there are only a handful of formatting rules to remember.
Other than that, it is the correct ways to structure the data using the API Objects in the bubble database as list fields, as well as when to not, and how to leverage the Hybrid Data structure most appropriately for the data type and use case.
For example, for some data usage, like a shopping cart, I will use a bubble data type, put field for user, and then a field as list of api objects, and some of the those api object keys are option sets.
Another aspect of learning to use it properly, at least for me, after so many years of relying on Bubble built in fields like created by and created date, is to remember to put those fields into the api object (plus other goodies like Modified By or other ‘meta data’).
Other than that, in my opinion, it is really easy to use as a plugin. It uses all the No Code concepts, and makes it really easy to actually target the right objects. The conditional event triggers and use of yes/no fields instead of checkboxes, make it really flexible.
But, overall, to really take advantage of it in the best way, it does take some time to play around with. In fact, I’ve been building with it and tweaking it over past 6 months to make it easier to use and more flexible. I likely will not be putting out content around it until May or June of 2026 as I have some other businesses outside of Bubble I’m currently starting on.
If you did take it for a test ride and have questions, feel free to send a private message.
Greatm thanks for sending some info as it provides clarity, I actually may be using the plugin to reduce my WUs. If anything is needed I’ll send you a private message!
