Pull last text of a list of texts within a list of texts?

Hey guys, how are you doing? So, I’m facing an issue with Bubble where a field for phone numbers and websites that are arriving from an API load perfectly fine when called manually, but not when I call it from the backend workflow.
Example from public data with the same exact structure.

I pure much gave up on trying to figure out why bubble is not getting those fields from the original call, but I figured I would solve this by picking the phone-number from another field called “extensions” or even the raw text.

Problem with this is that Extensions is not a text field but a list of texts for every business, as you can see in the first screenshot.

I’m getting those records in a loop where I send the a list of business, with a list of every field. So, usually “list of names, Item #current”; list of reviews, item#current". Etc…

But extensions also being a list, it would be "list of extensions, item #current: last item (as extensions is a list within every business). But Bubble dosn’t accept that I pull last item from the list within a list. Not 100% sure why as issues don’t showup on backend workflows:

If I try to send a list of extensions to every business record, Bubble does accept that but I get nothing most of the time, and sometimes some part of it.


Based on this, or just in the first screenshot. Does anybody has dealt with a situation like this in a better way? I need to log those phonenumbers and websites from this API this week x.x

I think you should not send the results in separate fields like each item’s address and then each item’s extensions. Bubble will create lists from that and Bubble does not keep a spot for an empty item. So if one item has an empty thing it will not align correctly. Can you shoiw a screen shot of the full “send-results” call. Also a screen shot of how you mapped the API return in the API connector because you should be able to access the phone attribute.

1 Like

That does help, William. Appreciate it.
When I started this, we had all fields in every record, but is not the case anymore for websites.

I did wanted to use just “place-results” from the call as an option, but thats not possible in the type fields in the API Workflow (its only DB tables and option sets)

Here is more of the send-results call (it just send the place_results from the API response to other API workflow, as to make it a controlled loop.

If I could select place_results (answer from the API call) as a type of field in the API workflow I could indeed pull them individually without all of those fields. That would be so much better.
I’m thinking on using the field type as text, and them make the send-results call send the raw text, treating that raw text for every place_result individually before saving it, like this:

You can Schedule a Backend Workflow on A List, and pass in The list returned from the api to run on and then for each field you would put “This item’s field to choose” so it would surely only send each item’s through.

Appreciate your time, mate, but I still have the same problem.
Bubble dosn’t recognize an API response “thing” as a field type option in neither Schedule nor simple backend workflows. Options are only database table’s or option sets.

It does allow you to choose API returns
Screenshot 2023-11-03 at 2.36.11 PM

This is a GET call in my API connector and I am running a backend workflow on the list of items returned from the GET call and then using each items fields as the fields in the workflow.

1 Like

Thank you so much, mate. I had never used that one before.
Althought it didn’t solve my original problem (still no phone and website records), its nice to have this option to trough lists, instead of doing recursive workflows.

I’m having support from the API supplier with it. It seems they have different setups for different values in a parameter :man_facepalming:

1 Like