ed19
6
This is a really big flaw in bubble’s list api action, I know it’s hot on the lips of a lot of people on the forum, but to my knowledge they are yet to fix it.
The fix for this (and basically every other situation where you want to run api calls on a list), is to use a recursive workflow instead. Scheduling a workflow that triggers itself recursively gives you a lot of control over what happens at the end of each step, just make sure to terminate it correctly as there’s a risk of infinite loops.
- Pass your list of things as a param
- Run your actions on list:first item
- Schedule the same workflow again, but change the list to “from item #2” and add the condition: “only when list:count > 1”
- In your last step you can reverse the conditional logic to do something on your final run: “only when list:count is 1”
Note that as of a couple months back, the schedule on a list action is more workflow unit efficient than recursive workflows, but only if you’re on a new plan. So if you are on a new plan, stick to list actions where you can.
It may also be more wf unit efficient to use an iterator, then search for each individual thing instead of sending the whole list to each call, but it’s not something I’ve had to worry about too much so I haven’t put the time into testing it.