it creates 1,400 records in by recos2 db, not the 200 that it is supposed to. Clearly it is thinking that the “List to run on” is 1,400 items long (7 attributes x 200 recos)
I own the API so I can make any edits to that as required. I have played around with changing the json response to look like this (I added in the square brackets around each reco):
But that causes this problem:
I’m sure there is a setup here that will work but I just can’t seem to figure it out. I’d love any help.
Thanks
A. On the endpoint, have a single parameter of type “Recommendation API Call wine_recos”, i.e. the type is the same as defined in the API connector. Then you can
pass just one parameter, and use its fields in the workflow.
B. Same as A, but define it as a list. Then instead of Schedule on a List, use a recursive Schedule API workflow, and pass the entire list as a single parameter, use the first item, and when running it again, pass the list :from item #2 .
This is more reliable than the list scheduler, but you need to be more careful to avoid never-ending loops.
Hi @mishav, as I discovered much to my consternation recently, you can’t actually define an endpoint parameter as an API-response data type. Only native Bubble and custom data types are possible. It has been discussed elsewhere on the forum. I’m not sure but I think it is what Keith refers to as the Ghetto API problem or words to that effect.
Likely I could get rid of the uppper level list (“wine_recos (list)”) and just have the “wine_recos_item 1 (list)” but this is working and I’m too lazy to change the API response again. This now makes the list to run on look like this:
I assume bubble’s programming makes it so that anything inside are seen as one item in the list and any {} are not. I’m not explaining it very well but essentially each of the 200 recos are now surrounded by which bubble now sees as 200 items in the list.