Showing personal Data from Aitable DB via API for a specific User

Hi there! I am very new to Bubble an have an issue, can somebody help?
I want to set up a Profile Page that shows some data to the user currently logged in. The data should be pulled from Airtable DB (Read, Write, Delete).
This is the Scenario:
We sell Second Hand Clothing on Commission, therefore we have an Airtable DB where Clients/Users are stored as Records, then there’s rows where information is, like: Products from this Client, Sold/Not Sold, Commission-Share, Money to pay out… and so on.
What i want to achieve is, that a user can create a login and look at his sold ITEMS, or see his “Money to pay out” and so on… But only his Information should be displayed…

How can i achieve this? I am only at the point of Pulling Data from Airtable and Display it in Airtable, but only a whole Row. Profile page is made but i am not sure how to display a speciffc AT-Record that ‘belongs’ to a User.

I am really happy if someone could help me with this!

Hello, to show the data stored in Airtable on your Bubble app, you can create a repeating group whose source is the Airtable API.

Let’s take the example of Products purchased by a User:
Data source of Repeating group = Get data from an external API>API provider>Airtable: your Products tab
Add constraint using parameters of your Airtable tab (let’s assume you’ve got a “Owner” column in the “Product” tab of your Airtable sheet) Owner=Current user’s Airtable ID
That suppose when you create a Bubble user, you need to create a new User in Airtable too and store the unique ID in Bubble.

Thanks so much for your fast reply! So far i get it, i think. My next question would be: how to store the unique Airtable ID in Bubble?

Sorry, i am quite a noob :sweat_smile:

Cool

  1. Create the new user in Airtable using an action in Bubble,
    2.Make change to Current user: Airtable ID=result of previous step’s Airtable record ID

Reach out to me if you have some more questions

Thanks! thats a lot of help! Just one more pleaaase!
Do i have to make this in a backend worklow or on the frontend? Any issues with Security reasons or something like that?

Cheers Mate!

If you filter the repeating group with constraints, only the filtered data will show up on your page. But if you use :filtered, then filtering is done client side; meaning users can access the non filtered data.
devease

Thats good to know, thanks a lot

These screen shots can maybe explain better where i am stuck

  1. When a new user signs up, the User also gets created in Airtable

  2. Then in Step 3 i tell Bubble to grap the Airtable ID from current user and add it to Bubble DB. I did this through “Result of last step” as you told me.
    I don’t know if this is right how i did, but it seemed to work when i tried.

Now i am struggeling to find out how to call up this unique ID in Bubble to display only Data to the user wich has the same ID in Airtable Record

Any idea?

Congrats, you’re almost done!
Create the repeating group on your page (as explained previously using as a constraint the record ID you saved)

https://api.airtable.com/v0/appko6iAFljgExf8M/User/rec8n3gAufe6AxffM

Where appko6iAFljgExf8M is your base id and rec8n3gAufe6AxffM is the id of the User in Airtable

You will need to pass the API key as a Bearer key as well.

So in bubble API connector you would parameterise the User id.

https://api.airtable.com/v0/appko6iAFljgExf8M/User/[userid]

So do the filtering on Airtable, not on Bubble.

But would’t that mean the data you pull is not dynamic? I would have to manually create one of these API “filters” for each user, or i am missunderstanding your approach… :thinking:

Now i get it, thanks for your screens. I’ll look at it and try as well