Unable to access dynamic data from my JSON body and parameters

I have connected my Python code to Bubble through an API connector and I am trying to add dynamic data to my parameters to get data from my radio buttons which my code uses. I tried using <> to enclose the values but it is not showing up in the workflow and is not working properly. I am not sure how to add dynamic parameters.
Some images of Bubble and my code for reference:

def generate():
    data = request.json
    general_topic = data.get('general_topic')
    interest = data.get('interest')
    project = generate_project(general_topic, interest)
    print("the suggested project is :"+ project)
    return jsonify({'suggested_project': project})

Why are you using code like this?
Can you share your settings when you call API? Are you using Bubble functions (Action or Get Data from API according to what you select in API Connector)?

Actually, I don’t see any reason to not use Bubble natives features…

Hi Jici. I am trying to make an app and unfortunately bubble does not provide all the features needed for our app functionality. I am using the api call as a data source and displaying its result in a pop up text. It should print out a suggested project based on input from the radio buttons but unfortunately it isn’t working. I will share my workflow code where I call the API.

You don’t share anything from inside your API Call. This is the settings we need.

What are you trying to do exactly? Why do you say Bubble doesn’t provide needed functionnality? Can you explain more?

The first screenshot is my API call. I am making an app that will display a passion project when the user selects a interest and passion project from radio buttons. I am using code to generate a randomized choice from my dataset which is also in my code.


I tried adding a field of user that assigns to the radio buttons value because I am unable to insert dynamic data in the JSON body but it is still not recognizing that as the variable that the code takes in



This is what happens even though it is assigning interest the right value so the API call isn’t recognizing it as the parameter so I don’t think I did it right which is what I need help with

In the first screenshot, you show API connector, not Get data from API settings (you only show this function, without details)

I shared where I call my API, it is in my third screenshot where I set the text of the popup as the result of my API call, is this not what you are asking?

Click on that to show your setting. This is where you set the dynamic values…

I changed the bottom one to interest’s value to be the radio button but for the top one for general_topic my radio buttons are on a different page. How do I get that data?

You need to pass the data between your pages. Could be using url parameters or DB or cookies. But url parameters is probably the best option