Forum Academy Marketplace Showcase Pricing Features

How to read result from backend workflow

Hello everyone!

It might be a silly question. Sorry. But how can i retrieve the result of my backend workflow?

When i press a button, i send some parameters to my backend workflow so it can process some information. So, after all the math, how can i read the result of this backend process?

I am new in Bubble but as far as i know, the backend workflow`s result is always a JSON, am i right?

I tryed to do a REALY simple thing as shown below: trigger a backend workflow to show the “Current user`s name”… But i cant read the result.

What am i missing here? :sweat_smile:

Think of an endpoint like if it was a function.

It can take inputs (or not). Those can be brought via parameters that you set or new ones can be done vía SCRUD (search, create, update, delete) functionality that you structure within the flow.

So, in your use case you need to determine what comes next after the action you are showing.

From where do you call this endpoint?

Thanks for the reply @cmarchan and @Jici !

I think my lack of expertise is the problem :rofl:

  1. I have a button that calls a Backend Workflow (without parameters)
  2. 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?

@rpetribu

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.

1 Like

You don’t need to use backend WF for that. Not sure what you expect exacly to do with this endpoint. Return Data from API it’s more to use from an third party tool.

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:

In this Backend workflow i have only this:

I was trying to get the message “This is a test text” in my main flow… but i keep recieving numbers…

Thats make no sense for me…

REally not sure exactly what you expect. Normally, you don’t call data usimg a Backend WF.
If you really wan’t to do this, use API Connector and call your own API Backend WF (Using a Post request).

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”.