Forum Academy Marketplace Showcase Pricing Features

List Popper and Friends: New SSA Plugin for Your Backend Workflow (API Workflow) Needs

Just published a new “free” plugin, “List Popper and Friends”, a set of trivial (but fiendishly clever) Server Side Actions that enable some very useful things in API Workflows.

(Like my List Shifter plugin, List Popper and Friends is Karma-Ware. If you find it useful, you can support my efforts here.)

The most interesting one (at the moment) is List Popper, which is very very handy for certain types of recursive API Workflows. The application is best explained via example… So here in this talky video, I show how to use it to bring unstructured data from an on-page shopping cart up into Bubble and transform it into proper Bubble objects (this in response to the questions posed here):

Go make something cool!

12 Likes

Thanks for making this available and the video to go with it. After watching I am really curious if you’d be willing to make the editor viewable so I and others who may find it helpful could build a replica.

I know you walked through most of the editor on the video but just for purposes of referencing I personally find poking around the editor easiest.

Looking forward to the other videos on carts you put out. I am a couple weeks away from getting to that stage in my app and excited to have the helpful videos to watch which will probably cut my development time by a week or more.

@keith I recently built out several recursive API workflows for a client for processing large CSV uploads using the first item, minus item method. But even with that, more than a 1,000 items in a list slowed Bubble waaaaaay down so I had to break the list into 1k chunks before processing them.

Is Listpopper any faster than ‘minus item’ or just easier?

Hey @boston85719, I published the links over here: 📒 What is the best way to publish a list of objects to bubble? :slight_smile:

1 Like

Hey @eli, there’s no reason to think it would be any faster. It’s just that List Popper gets around the issue of skimming items off a list of non-unique items.

(The speed of API workflows is entirely linked to an app’s capacity as far as I can tell. And, IMHO, Bubble seems really stingy with compute.)

1 Like

nice icon!

Thanks for making this available @keith . This is going to save me a lot of time and pain in dealing with lists and duplicate values (like quantities).

2 Likes

@keith, have you made any videos with examples showing how you would use list popper with api results (the ‘blob’ we get from api returns)?

HI @tom9, I have not, but it would be really, really similar to the video I posted previously. Although… I was thinking about maybe doing a video this afternoon and this might be a cool topic.

@keith honestly i’d watch any video from you on APIs.

1 Like

Just a note that List Popper & Friends version 1.0.2 is now available. This version adds a new feature to the FLOW State List SSA (ability to publish a list of the list items’ indices) and also a brand new server-side action, “IndexOf SSA”, which returns either the first or last index of where a given Item is found in a given List.

The IndexOf SSA is useful for scenarios such as the one discussed in this thread.

Hey Keith, hope all is well with you in San Francisco!

Question: I’ve been using List Popper to successfully convert Javascript Objects into bubble objects. So fun! Thank you!

It seems more elegant than using Bubble’s native Schedule Workflow on a List because with List Popper, I can always save the not yet processed parts to the database with two upsides:

  1. Traceability: If the associated “processor” workflow fails for some reason, I can always restart it on the remaining list without having any confusion as to what was processed vs what wasn’t.
  2. Progress indication: This is basically also “traceability” but specifically that, because I have the known size of the unprocessed list stored somewhere, I can make UI feedback like:
    image

As far as I know, this isn’t easily done with Bubble’s native Schedule Workflow on a List, or am I wrong?

Anyhow, for all of these reasons, I want to stick with using List Popper for list iteration but I have one BIGish problem:

List Popper doesn’t seem to work on the User data type :confused:

Basically, any “Popped” User items return nothing, zilch. Other datatypes with the exact same permissions and workflow do return expected data.

After fiddling for a while I finally just deleted all of my User permissions (which is itself problematic) to make the User type totally public. I thought, “That should make it work!” Alas, it didn’t. List Popper doesn’t seem to transmit User data into any step of a workflow irrespective of permissions.

Have you been able to process a list of Users using List Popper? Perhaps I’ve just made a simple mistake?

I guess I can just go the " minus item: first item…” approach to this. Doing so still offers the “Traceability” and “Progress Indication” I thought only List Popper could afford… so long as my list of Users doesn’t include duplicates. But Bubble things pulled from the database always have unique IDs so that shouldn’t be an issue.

In the meantime, if anyone can confirm or deny that List Popper doesn’t work on the User field, I think that would be a good community contribution :slight_smile:

I haven’t tried that @zelus_pudding, but I’ll look into it. There’s nothing fancy going on in List Popper — but you might want to upgrade to the latest version. Older versions only work with non-thing (primitive) data types, but I fixed that in more recent versions. That’s probably the issue as Users are of course Things.

1 Like

Hmmm, strange. I was pretty sure I tested it against the upgrade :thinking:

Hi @keith,

Would it be possible to support null values within a list?

Currently experiencing this error message:

Workflow error - Plugin action List Popper SSA error: TypeError: Cannot read property ‘object’ of null at LambdaListApi.get (/var/task/index.js:187:36) at eval (eval at build_function (/var/task/index.js:55:21), :1:53) at /var/task/index.js:296:23 at run_fn (/var/task/u.js:594:18)

@zelus_pudding Did you ever manage to figure out why List Popper was not returning anything when it comes to Users? I’m having the same issue!

Well, I just took a look at the code again and it seems that what was published did not work properly for lists that are Things (Users of course are Things).

I just published version 1.0.4. Upgrade and test that one out an let me know if it works properly. (I’ve not thoroughly tested it myself, but this should solve your problem. Please let me know either way.)

Thanks,
Keith

I did get it to work but can’t remember what the issue was. My best guess right now was perhaps I had forgot to set the right data permissions (though I’m not sure that was it).

See above (List Popper and Friends: New SSA Plugin for Your Backend Workflow (API Workflow) Needs).

You probably made it work by passing the Users as their unique IDs. But 1.04 should properly support Things now. (In all of the Actions in this plugin. I think the source of my confusion before was that I had added Thing support to one of the other Actions, but not to List Popper itself.)

1 Like

That was it!