Forum Academy Marketplace Showcase Pricing Features

API Workflow POST creating multiple things

Hi - I need to setup an API endpoint and workflow that will allow an external service to create a POST request to the endpoint with a JSON body that would ultimately need to create multiple things. I have some flexibility as to how to structure the POST body but essentially it would be something like (excuse the non-JSON formatting, mostly just trying to get the idea across):

Readings:
1,22
2,22
3,24
5,23
8,27

I then need to create a new thing for each of the items, so for the above example, there would be 5 things created with 2 fields set for each.

Is this possible with Bubble? I haven’t found much of any forum discussion or documentation that covers processing API endpoint POST bodies and am worried that you have to create a new request for each reading. That route won’t work as I’ll have 1000’s of things that I need to create and each would then take up a workflow run (let alone probably not be that efficient).

Again, I have flexibility as to how the JSON will look and could have it include name:value pairs each time or have it be more like:

Reading
count:1
reading:22

Reading
count:2
reading:23

Reading
count:3
reading:23

Or any other type of structure that is more Bubble-friendly.

Any help or pointers as to what to try out would be greatly appreciated! Thank you all!

Mike

1 Like

Hi Mike,

Did you see Nigel’s post here? I’m also working to implement it to solve my issue which I think is what you’re also after.

I did actually and yes, it helped! I think I have mostly what I need working now. Thanks for the follow up!

Could you share your solution? I’m still running into challenges and would appreciate another example to learn from.