I have a button that calls a Backend Workflow (without parameters)
In this Backend Workflow i want to get the “Current User`s Name” (or any other information)
So, in my main workflow, just after my button calls this Backend Workflow event, how can i get this information (Current user`s name) that was generated in the Backend? Is it possible to illustrate it for me in some application? Or with images?
If you want to send the browser’s current user data to the backend endpoint then create a parameter of type user in the endpoint and when you click the button schedule the flow and send the current user in that user parameter.
If you just scheduled the backend flow upon a click then just place a display element on the page and run a search to find it. The display elements can be a text element, a group, a repeating group, etc.
The reason is that this specific action will be trigger in and outside my application. So i decided to create this endpoint to have this operation written only in one place. And i am expecting to read it from outside and from inside.
I have no problem to get the result from outside… The problem is to read it inside Bubble…
Get the “Current User`s Name” was an example. I am trying to read anything from the endpoint.
This guy is having the same issue as me:
I have a button to trigger the Backend workflow as below:
The text is apparently the n# of the workflow schedule, bit not the actual result. And yes, I am clueless about why we cannot read the data from within Bubble either. I also contacted support but couldn’t get a clear answer on this. I had to really work around via the database to store my data instead, for something as silly as generating a concatenated string.
@emmanuel is there someone at Bubble who can shed light on the usage of this return data from API feature and how to use it? Why can’t we get the data, back to the front-end?
Like I said earlier, this exist to be use from an external third party tool (real API Call).
If you call this endpoint using API Connector, you will be able to read the data returned.
But there’s absolutely no reason to use a Backend WF from Frontend to get data. All tools already exist to get data from the “frontend”.
Thank you. I think the issue is for that those (like me) that are not yet API conversant, we are wondering if there is a way to pull the data from a backend workflow without having to treat your own app as an external app you need to call from. If there is absolutely no other way to get data from a backend workflow then so be it, but I’m still not clear on whether it’s possible via Bubble’s regular backend and regular worfklow screens.
Hi, received a helpful response from Bubble support. In short, you can’t get data from the backend workflow using “Return data from API” step. Further, if you are looking to retrieve and display data, you can’t use a backend workflow for that (need to use a API call from the front end, as posters here have noted).
To really understand the API stuff, I need to spend some serious time on the videos/documents and then do all the experimenting to see how it works in practice. I’ll post back any insights if/when I get through that process.