Use multiple items in one workflow to trigger seperate executions of another workflow.
I have a workflow that gathers some basic json data which is to be used to run another workflow. It’s possible that it will produce 0, 1 or more items of identically structured simple json.
My problem is that the second workflow uses a Wait Node, which works based on the execution number. As a result if I have more than 1 items then the Wait node is triggered when the first item produces a return, and the other items aren’t ready yet. I need to retain the Wait Node for each item, and so it seems the best thing would be to trigger multiple executions; one execution for each item.
Can anyone suggest an approach to complete this workflow so that it will trigger the second workflow once for each item instead once for all three items together?
This is my workflow
(I haven’t hooked it up to a timer yet, so for now it has a manual execution, but I’ll get to that)
Thanks for the reply and the suggestion. Sadly, I don’t think this approach is going to be possible, because I need to have each item run through the sub-workflow seperately so that each item has it’s own Wait node which can be triggered using it’s own workflow number in the $execution.resumeUrl.
This approach of using the Split in Batches will achieve the first goal of executing the subworkflow once for each item in the first workflow, but as long as the Wait node causes an error I’ve got a problem, and I’ve tested that and it does still cause an error.
Bringing the Wait node into the first workflow means I’m back to having multiple items per execution but only one Wait node per execution, whereas I need a seperate Wait node for each item, and therefore seperate executions for each item.
I’d love to hear more about when N8N-6883/PAY-80 will be addressed, as that sounds like it is really the key thing for me. Alternatively, if you have any other suggestions for a workaround then please do share them.