Recursive workflow on a list that has lists within it

I am stuck trying to get my recursive workflow to run properly.

I have json getting returned from an api call and I’m trying to have a recursive workflow run at the “sailing” level but it has lists within it.

I have setup data types to match exactly what the json file returns but can’t get it to work (stays red and dosen’t recognize the data type when passing to the recursive workflow)

How do you go about setting up a recursive workflow for this? I ultimately want to save all the “sailing” data and need to be notified when it’s completed.

hello, I’m not sure undestanding, but seems the parse no correclty, all right? The Bubble done automatic parse when you mark return “json”, but do you can return the data who “text” and make your manual parse (see the attchment for make change), I just warn you that manual analysis takes more time and requires more attention.

if you have nested lists within lists then you have 2 options

1 - iterate the first list and the nested lists and process the nested lists in the background
2 - iterate the first list and the nested lists and process the nested lists for first level item before moving to the next item in the list

depends on the type of “progress” you need.

for instance I have a complex math calc so I need to do #2
but often I can just do #1 and keep things simple

forcing order and waits is rather complex but possible (#2) using start and complete logic for each iteration level

I think option 1 should work for what I am looking at doing. I think my main issue is getting it to send data from one workflow into the other as a list and then iterate over it. I can do it from a basic list of numbers but when that list has a nested list I can’t figure out how to get it to work.

Any tips on how to properly set it up to work?

Hi, I’ve got the same issue with processing nested JSON data that has nested lists.

I need to process the data via a recursive WF, as the order of the data is important. Using the “Schedule API on a List” doesn’t suit because it doesn’t retain the order.

I understand how to set up the recursive WF at the top level - e.g. “Itineraries” in this example. Then as a step I want to call another recursive WF on the “Itinerary Days” list, BUT, Bubble doesn’t allow me to pass the list. The “Get All Itineraries itinerary day” is not an available data type.

I’ve tried making dummy API calls to create a custom data type, but they are still not available in the step that I need.

I gave up trying to get this to work, I instead I setup a script in a server to run the API call, process the data, then send it to bubble in a nice clean flattened format.

I then just run an app call to my server to trigger the script to run. I had ChatGPT write the script for me. It was easier for me to do this than try to make a bunch of workflows.

Probably not the answer you were looking for but it’s what worked for me.

Cheers, thanks for feedback.

1 Like