I finally was able to get my response from Open AI to return me a list of things that I save in a repeating group. Each RG cell contains a “Title” “URL” and “address” field. This is great! But now I’m trying to be able to save each of these to their corresponding field in the database and am having terrible luck doing so. To be crystal clear form the image below, I want to save the results I have on the right into the DB where “The Louvre” is one “Recommendation” (data type) and the fields within that data type are name, URL, address.
I’ve seen on the forum that “Orchestra” plugin was recommended but I couldn’t find clear enough instructions for my level of understanding. If this is still the way to do it could someone please provide step by step info as to how they’ve used Orchestra?
Since you can show this list in a repeating group, you can also send it to a backend workflow to be processed.
In this backend workflow, you will create a Recommendation with the first, second, and third element of the list. Then, you remove the first three elements and then, you will call the same backend workflow recursively.
This backend workflow will also have a condition to work only if the input list is not empty, so it can stop.
I have created a sample for you. See the demo below. In the demo, the left RG is just a list of text (like your REX repeating group) and the one on the right is the Recommendation data type (Which initially empty).
When button is clicked it calls a backend workflow:
You can check the whole example here: Tests for Forum 8 | Bubble Editor (the example will stay online, but of course, I have to cancel the trial starter plan that makes the backend workflows available).
@hergin Thank you so so so much for spending time answering me, I really appreciate it! Your instructions are very clear to follow. My only problem now is that my repeating group is not a list of texts but is formatted to receive the json response from ChatGPT.
Because of this then in my workflow when I try to send the “RepeatingGroup text’a list of texts” it will not work for me because it is looking at a more specific data type.
My only option then becomes :raw body text but when I send that in the workflow my data entry is empty.
I don’t know unfortunately. You have to convert the items or get the items in the repeating group somehow. How does your repeating group’s cell view the data? How does Louvre Museum get printed for example?
On the left-hand side, a user can enter text (recommendations they’ve received from a friend). Then I send a call to chatgpt and when I get the response I run a backend workflow to convert the response into a json format that I want that will fit my data type of REX (recommendation). That Rex has a title, url, and address. Therefore the repeating group is formatted to receive that json response.
Oh I thought it is 3 different texts each in a cell. So there is 3 texts in a cell. Can you show how one of them is printed in a cell? How does Louvre Museum get printed for example in the editor?
I guess raw body might still be returning a valid json for just one entry of Rez (with title, url and address). Maybe in your backend workflow, you couldn’t parse the json to put the corresponding fields of json to the corresponding fields of Recommendation in your system. Maybe try printing the each item’s raw body text to a text field in your page first to see what is passing to the backend workflow.
Hello I have the same problem as you. I need to display in a list or in a repeating group the answer of Mistral ia. How did you do it? I read your post about the entries but you didn’t give the solution you said you found on this post. Can you share the solution?
@hergin oh man, you really saved my ass with this solution, Thank you very much, I really buy you a coffee anytime, if you have a paypal button or crypto wallet hahahaha. Thanks!