Hey community,
I have a view that I list 20 users every time. I have a shuffle button to refresh this list.
But I couldnt find a way to refresh this list on tapping shuffle button.
In workflow, I tried adding clear list > display list in short list. But this doesnt make any effect.
I think Bubble caching the user data and so its only showing data once.
Then I changed logic and set users list data source to page custom states. I tried removing and updating this custom states. No effect. Its only loading the once on page load and not refreshing on tapping shuffle..
Does anyone have any idea? What can I try to refresh data on button tapping?
Thanks.
Option 1: Use Bubble’s Data API
Enable the Data API in your App Settings and simply call the endpoint that returns your User list (with whatever filters you need) each time you want to refresh. Documentation:
https://manual.bubble.io/help-guides/integrations/api/the-bubble-api/the-data-api/data-api-requests
Option 2: Build a Custom “Refresh” Endpoint
Create a Backend API Workflow
In the Backend Workflows section, add a new API Workflow (e.g. refresh_user_list).
Add any input parameters or filters you need.
In the final step, use “Return data from API” to send back the list of Users (and format the JSON exactly how you want).
Register it in the API Connector
In the API Connector plugin, add a new call pointing to your refresh_user_list endpoint.
Add an extra parameter (e.g. cache_bust) and pass in a unique value—like the current date‑time in ISO format on every call.
By changing cache_bust each time, Bubble sees a “new” request and will re‑run the workflow instead of serving a cached response.
That way, whether you hit the native Data API or your own workflow, you’ll force Bubble to fetch fresh data every time.
2 Likes
Thanks for making such detailed explanation. I will try implementhing yhis and share the result back.
1 Like
Hey, were you able to implement it?
Hey there, I tried both ways. Its still sending me same list everytime. As you said, I added cache bust and gave it to unique current time on every call. Strangely, its responding back same list in the same ordered users. Here I share my setup.
I added a backend api with return data action.
Then I setup api connector as following
Finally I setup data into my front end users list as following
Its sending same list every time.. What am I doing wrong?
Forgot added you in the reply
Hi there!
I originally tried a simpler approach, but it didn’t work reliably. Here’s a more robust (albeit slightly more involved) solution:
Create Workflow “get-users-json”
In your Backend Workflows , add an API endpoint that performs a Search for Users .
Use “Return data from API” to output the resulting list as JSON.
Example output:
[
{ "email": "alice@example.com", "name": "Alice" },
{ "email": "bob@example.com", "name": "Bob" },
…
]
Create Workflow “randomize-users”
Configure in API Connector
Add both endpoints to your API Connector with the correct URLs and headers.
Test each one to verify you get the raw JSON from get-users-json and the shuffled JSON from randomize-users .
Client‑side Call
In your front‑end workflow, call the randomize-users endpoint.
It will return a fresh, randomly ordered list each time.
Map over that JSON to display the fields you need (email, name, etc.).
1 Like
system
Closed
August 23, 2025, 3:41pm
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.