Need help writing to database with list called from api source

Thanks for all your help on this thread. I got my API info to populate perfectly in the database. :slight_smile:

1 Like

Hey @louisadekoya I tried following this thread, and it seems to me that I have it set up the same way, but unfortunately not working.

I’ve got a button to schedule an API workflow:

That triggers my Airtable API GET call and then schedules a “workflow on a list” called add-free-trials:

Here’s the add-free-trials endpoint settings:

And finally, here’s the “create new thing” step settings in the endpoint:

Unfortunately, the results are all of the names being added into one database entry 5 times:

Hi Jack,

In your second screenshot, try setting pName to “This record’s Name”.

Louis

3 Likes

Wow that fixed it haha. Spent so much time messing with it! Thanks a bunch.

2 Likes

Hello Jack,

In your second screenshot, TYPE OF THING → Airtable API call record … is this a type in your bubble database?

I’m trying to undertand how to define the type of thing for schedule API workflow, when my call to API (your step 1) is not returning one of mine database types

1 Like

I would suggest that Bubble add a training video on writing API data into databases. Some applications may pull quite a bit of data on an initial load for an application (e.g. registered users to a webinar could be upwards of 1000) and pulling that data multiple times is a bit of a PITA. Storing it would be more useful and this would be a great training video.

Love this forum - full of good ideas!

2 Likes

Thanks a lot people, helped a lot the thread. Agreed that Bubble can help with a better content about this writing on database from API that comes with complex JSONs, like nested data.

Hi, @ louisadekoya I am here new. I have same problem with bubble.
I tried following your guides but it doesn’t work well.
image
there is no item(pName and pPermissions) to set.
please help me.

Not an expert, just another person with a “API returns a list” problem and pouring over these messages to understand how to fix it. Your issue seems to be that you need to add parameters to your addrolepermission API definition. On the popup where you give it a name there is a button that says “Add A New Parameter”…click that and add one called pName and another called pPermission, and give them types (text?), indicate if they are lists, and if they are optional. Then they will show up on the Schedule API Workflow On A List popup. Set the value to “This Role Permission’s Name” and “This Role Permission’s Permission” and it should work.