Have SplitInbatches run for every input

Right now i have the SplitInBatches to run at 1 (Works for me to not corrupt my data)

but it only runs once, doesnt matter how much input there is

How can i make it run for each input?

You need to loop it!

Set your Batch Size to 1 will help in your case.

Example:

1 Like

Will it stop the loop when all the data is done?

Yes. Of course

Splitinbatch will keep executing until all input datas are completed.

Hmm in my case it does the first one and then cuts off, Which node would i need to connect to make it loop correctly?

Try connecting/looping both discord to split in batch input again.

Make sure you’re setting batch size to 1

Okay, That redid the first one over and over so that didnt work + created a magnificent penis haha

It redid it 8 times while there are 90 inputs

It didn’t worked?

Sadly it didnt

This did the trick:

  "nodes": [
    {
      "parameters": {
        "batchSize": 1,
        "options": {
          "reset": false
        }
      },
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 1,
      "position": [
        1200,
        550
      ]
    },
    {
      "parameters": {},
      "name": "Loop",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1200,
        700
      ]
    }
  ],
  "connections": {
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}```
1 Like

it does loop, But i get the wrong data output so, next thing for me to figure out

1 Like

When i get the correct data it only executes 8 times
When i get it to execute the full 90 times i get incorrect data, Head Scratching stuff :face_with_symbols_over_mouth:

So like this i get correct data but as you see it only runs 8 times?

Turns out, When Mysql Fails to output data it thinks it’s done, Setting it to “Always Output data” makes it run

What you’re trying to do with MySQL node? Seems you’re trying to get data out of it. Am I right?

Explaining your use case in a detailed way can help me to understand the flow. :grin:

What you’re trying to achieve?

Oh i got it working now :slight_smile: I simply had to turn on the option to always output data, Otherwise the loop thinks it’s done and stops

1 Like