Mostly auto generated text using Otter. Please refer to the video ;-)
Alright, let’s get started. I’ve been wanting to write about Bubble’s powerful API functionality for a while now and finally got a reason! Thanks Jared!
This morning as I was browsing Twitter, I came across this question by this Twitter user and NoCode enthusiast Jared. Jared asked here
does anyone know, can i send a list of text to an integromat webhook and then have this create 1 thing per list item in my BubbleDB? (on a free plan).
Integromat is a service which helps tie things together. I believe from the response that Integromat is able to create bulk data things through their service.
However, there is also a way to do this without using an external service and do it Bubble itself calls to its API. The API Bubble provides bulk creation as part of its service. Its pretty straightforward.
And for demonstration I will use a sample application, in which I’ve created a data type called character and character has basically one field called name. And before we go further, let me try and create a sample entry into the character table and let’s call it, Harry Potter.
Next, to be able to access the API for any Bubble application you need to go to settings and then the API tab, and you need to enable data API’s for the data collection are in Bubble that’s called the data things to be accessible throughout through them to an API.
And also you need to provide an API token.
I just created a sample token here, and I’m really used that through postman, which is basically a way to call the Bubble API, through a user interface.
Getting the API is pretty straightforward as as explained in the manual, which I’ll put in the documentation section.
And here basically we are calling my application the test version of it, followed by API version, followed by the object, which is in this case called a character.
Before I go forward with creating an application Let me try and test on getting the data, which is basically the sample data that I just entered for this particular thing called character, and that’s Harry Potter issuing This is through a get request, and the only setting that required her early authorization, which is done through a bearer token.
And the token is entered into this field in postman I send this request. And, as expected this gives me back. The result in the database which is basically a name and Harry Potter.
Now let’s look at issuing bulk requests to the bulk creation API for new things, and that is again very straightforward. You basically when you send data you send through a data through a POST request with all the required data, and you’re calling the same URL with slash bulk at the end of it, to basically let Babel know that you want to create multiple things.
And here I’ll use see most of the most of the data as you can see here is default creations of of the collection only name is the one which has been created as the user, and therefore you can just use the body with raw format as plain text and provide the list of items that you want to provide separated by a new line, and click Send.
When you click send the data goes over to Bubble as a bulk request and you have success messages for each of these items. And if you see here, Harry Potter is created here and the other characters are reflecting in the database. This is a quick and easy way to experiment with Bubbles functionality without relying on any third party tool.
But however, it is very effective in my opinion learn the functionality that Bubble equips the user with in order to be able to make the most of the platform, which is fantastic!