Node "Execute Sub-workflow node" fails to trigger provided items one by one on loop and altogether on items array

Describe the problem/error/question

`
I pursue a way to perform parallel operations with N8N. So far, I know a @hubschrauber’s version, with wait node on callback mode. His approach is flaw-prone because the interval between node trigger and reactivation may have callback requests.

My implementation follows a redis approach: I implement redis storage of process results readiness (For now, it saves the result as well, but we can improve it latter for medium-sized payloads).

I pasted both big and minimal examples, as well as a example workflow to be triggered: the parallel manager workflow fails to trigger a Sub-workflow loop (also fails to trigger item by item when I set the node “Execute Sub-workflow” to execute for each item, without loop).

You can test with command below. Firstly copy-paste and activate, separately, both workflows for requests management and get-post workflow, both available on section ‘Please share your workflow’.

export PROD_WEBHOOK_PATH=https://n8n.example.com/webhook-test
export TEST_WEBHOOK_PATH=https://n8n.webhook.example.com/webhook
time curl -X POST "$TEST_WEBHOOK_PATH/request"      -H "Content-Type: application/json"      -d '{
    "nodes": [
        { "id": 1, "method": "GET", "url": "$PROD_WEBHOOK_PATH/get-subworkflow", "depends_on": [] },
        { "id": 2, "method": "POST", "url": "$PROD_WEBHOOK_PATH/post-subworkflow", "data": { "a": 1, "b": 2, "c": 3 }, "depends_on": [1]},
        { "id": 3, "method": "POST", "url": "$PROD_WEBHOOK_PATH/post-subworkflow", "data": { "a": 1, "b": 2, "c": 3 }, "depends_on": [1]}
    ]
}'

Below an image of the workflow in its full glory:

What is the error message (if any)?

Please share your workflow

Since the workflow is really big for this text field, I stored it on github: https://raw.githubusercontent.com/alloyha/assets/refs/heads/main/n8n/parallel_manager.json

I also implemented a minimal example with the same architectural logic, but it works as I expected for my demay:

Information on your n8n setup

  • n8nVersion: 1.80.5
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.3
  • database: postgres
  • executionMode: scaling
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: dee85e98-a119-41f3-922a-6c882db3b7dc

I worked on two things from ur provided data:
1- the

2- The mini workflow is provided.

my point of view, the problem in the input data to the loop node…
I try to change the structure of the input data of loop and its working and execute all the iteratiosn

check this one:

note:

  • I save the executed part in a different workflow.

If my answer rings any bell 🔔 take a step, love it ❤️ and let me know! But if it's correct 👍, please mark it as the accepted solution! Thanks a lot! 😊

Let me know if you’d like any further tweaks! :rocket:

2 Likes

Thanks, @AhmadAlnaqa. I had a solution already, but yout answer helps me understand even further n8n. Thanks for you help!

Thanks, and good luck with ur project.

1 Like

Just to make this exchange valuable to both of us: I learned, the “item” mentioned in N8N must always have properties ‘json’ and ‘pairedItem.item’. On below example provided, we have 2 json objects in an array. We perform this N8N requirement transform step, and set workflow to iterate along each item indidividually, waiting them to finish.

items = [
  { "a": 1, "b": 2, "c": 3 },
  { "a": 4, "b": 5, "c": 6 }
];

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.