I’ve been working on content moderation where image URL gets passed to MS Azure content moderator however, its rate limited to 1 URL per sec so I would need to split them into batches and apply a time interval. But after splitting them into batches I have no idea how to merge them back.
I tried using the merge node but it requires two inputs and there’s this one multiplex mode which I’m not sure what to make of it.
Hi @ReMiKU, the basic idea in the linked thread should still work, even for strings.
The difference to your desired output would be that it creates a single item with an allData field instead of multiple items though.
Here’s a more generic example that would merge the original items:
Example Workflow
You would need to replace HTTP Request in the example Function node’s code with the name of the last node in your loop (so Wait1 if you’re using the workflow from your screenshot, or Set Result1 assuming you want to run this node as part of your loop).
This Function node would run only once and return all items as a single list:
You’re right, it indeed works with string! I didn’t think you’d have to revise the function as well to use concat, sweet! and interestingly I also notice you put some arguments within the expression!
Now that I’ve read the docs regarding expressions I didn’t know there’s more you could do with it!
those aside, I followed as you suggested however, there’s a slight problem:
The IF node waits up until the second last item instead of the final item then passes twice to the function node. And I think it’s being caused by the wait node :L