How to read the result of a backend workflow

I have an input field (number) and a button. A user enters a number (example: 10) and hits the submit button. That button has to create 10 “things”. I then need those 10 things to be added 1 by 1 to a repeating group.

I figured I’ll make a recursive workflow to create “n” things, and I’ll just handle it with an index as a parameter, it’ll keep referencing itself until index >= n. Then on the final action (on that backend workflow) I’ll just have a return action, so I can reference that newly created thing on my front end workflow.

However, it doesn’t read it, am I missing something here?

Yeah Backend Workflows can’t send data back to front end for now. You can listen to the field/data type where you’re adding items and display them in an RG.

I strongly advise agains using workflow to alter data source. It’s a nightmare to debug.
I suggest going for:

  1. Custom state conditional that impacts the data source - easy to debug.
  2. Have you tried return data from API flow?
  • adding return data from API in backend workflow
  • receiving it on the fronted
  1. Creating an element on the page load, to which you later connect the result of backend workflow - you can ma an repeating group be dependant on a things value ex. ReturnList list of things - when not empty data source is this Things ReturnList.
    Many approaches.

There are many ways you can do this:

first of all, the Return step in backend does not work when you call the API workflwo from front end workflow, it will only work on API calls. so you need to call the API workflow with api connector.

Now come to you senario, where you want to create the N number of things. what you are doing it correct way. you dont need to reference back those thing to be use in Repeating Group. bubble will do it automaticly.

Inside your repeating group you do need to Do a search for such thing and like file created by this user.

when you create a new file it will automaticly be added to that repeating group , bubble have built socket whicuh automaticly does this.

I am happy to help you further if you like can book a meeting i help you make it better.

Backend Workflows do not return data if you are using schedule API workflow. You can integrate the API in API connector and then receive the result.

Or, you can set a status with the data type, make it as completed when this workflow is completed. and on the frontend make changes when you received the status change.

It is not the most elegant solution however, currently bubble does not allow return data directly, so we improvise.

Hope it helps!

1 Like

The thing is, that the repeating group I want to add it to - isn’t the repeating group that bubble adds it automatically, it’s another repeating group on the same page. I use it as a temporary storage, as soon as the user clicks out , the list in the repeating group gets deleted.

I like the idea on calling the API workflow with the API connector, I didn’t know that was possible, will research into that. As long as I can use that new thing created from a front end workflow, then I can make it work.

okey, in this sens you need to call the backend workflow with api connector and use return data step at the end. This way you will get a response from when the workflow ends.

Hey OP, just for you to know, even though 100% of users will encounter this problem, Bubble’s @allenyang recently stated that allowing this is not on their product development roadmap. So you’ll need to use the API connector to “connect into your own app,” so to speak. Just know that this also means the workflow is exposed to the rest of the internet even if it’s only meant to be private/internal.

This topic was automatically closed after 70 days. New replies are no longer allowed.