How to reset split in batch advance after i provide new set of baserow data

Describe the issue/error/question: After the batch is completed i check for if condition then again trigger baserow to provide new data.The data comes but split in batch dont start from beginning it sends the done result. I want it again go into loop with new value

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
{
  "meta": {
    "instanceId": "33a95628978e9cf49b26fa293e0020aedcb56b22db6c513f5d118b3c7e3a74a8"
  },
  "nodes": [
    {
      "parameters": {
        "path": "5c6f3ff3-552d-48d8-854b-369eca730180",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "c928654a-6f57-46d2-be90-cadb6c4eed78",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -260,
        260
      ],
      "webhookId": "5c6f3ff3-552d-48d8-854b-369eca730180"
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "e3bbbc07-6056-4807-aa3b-c40aa5005554",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        2120,
        520
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://database.tureais.com/database",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "python-requests/2.26.0"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate"
            },
            {
              "name": "Accept",
              "value": "/"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Content-type",
              "value": "application/json"
            },
            {
              "name": "X-Baserow-Event",
              "value": "rows.updated"
            },
            {
              "name": "X-Baserow-Delivery",
              "value": "bda54935-804d-40a5-8a90-c10259c73c77"
            },
            {
              "name": "Content-Length",
              "value": "309"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ $json.people }}",
        "options": {}
      },
      "id": "c9a67ce2-c21b-45b9-8045-dae75bf39508",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        2420,
        280
      ],
      "disabled": true
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "url",
              "value": "={{ $json.body.url }}"
            }
          ],
          "number": [
            {
              "name": "page_no",
              "value": "={{ $json.body.page_no }}"
            }
          ]
        },
        "options": {}
      },
      "id": "4c364e07-9216-40ed-bebd-c4bf37165d27",
      "name": "URL and number",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        -60,
        260
      ]
    },
    {
      "parameters": {
        "command": "=python3  /app/data/test/apollo.py \"{{$json.url}}\""
      },
      "id": "f1c10012-31e1-43f1-b878-fc61c50ecdd4",
      "name": "parsing filters",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        80,
        260
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "filter",
              "value": "={{ $node[\"parsing filters\"].json.stdout }}"
            },
            {
              "name": "=api key",
              "value": "={{ $node[\"Baserow2\"].json[\"Api keys\"] }}"
            }
          ]
        },
        "options": {}
      },
      "id": "f2446a04-8dd1-4f1f-b1e2-833e2b4d9571",
      "name": "setting API key",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1160,
        160
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $runIndex+1 }}",
              "operation": "smallerEqual",
              "value2": "={{ $node[\"URL and number\"].json[\"body\"][\"page_no\"] }}"
            }
          ]
        }
      },
      "id": "5f370b91-cf38-412c-98e2-a0189f9a556c",
      "name": "all page done check",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1340,
        160
      ]
    },
    {
      "parameters": {
        "command": "=python3 /app/data/test/testapi.py \"{{ $node[\"setting API key\"].json[\"filter\"] }}\" \"{{ $runIndex+1 }}\" \"{{ $json[\"Api keys\"] }}\" "
      },
      "id": "838713ea-21f0-4875-947c-d43a9d96b9bf",
      "name": "creating API data",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1640,
        140
      ]
    },
    {
      "parameters": {
        "operation": "toFile",
        "fileFormat": "csv",
        "options": {
          "fileName": "/app/code/test/test.csv"
        }
      },
      "id": "1d374b90-2cae-40b1-967c-05544a85a041",
      "name": "Spreadsheet File",
      "type": "n8n-nodes-base.spreadsheetFile",
      "typeVersion": 1,
      "position": [
        2240,
        140
      ],
      "disabled": true
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json[\"id\"] }}",
              "operation": "smallerEqual",
              "value2": "=29"
            }
          ]
        }
      },
      "id": "54f79619-4542-4940-baf4-96d463199e11",
      "name": "IF1",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1060,
        440
      ]
    },
    {
      "parameters": {
        "databaseId": 87,
        "tableId": 426,
        "returnAll": true,
        "additionalOptions": {}
      },
      "id": "64eb90fc-c801-4697-8406-827e36176848",
      "name": "Baserow2",
      "type": "n8n-nodes-base.baserow",
      "typeVersion": 1,
      "position": [
        240,
        260
      ],
      "credentials": {
        "baserowApi": {
          "id": "2",
          "name": "Baserow account"
        }
      }
    },
    {
      "parameters": {
        "databaseId": 87,
        "tableId": 426,
        "returnAll": true,
        "additionalOptions": {}
      },
      "id": "faab2844-6bfa-4b76-aff4-b1209775e198",
      "name": "Baserow3",
      "type": "n8n-nodes-base.baserow",
      "typeVersion": 1,
      "position": [
        1440,
        580
      ],
      "credentials": {
        "baserowApi": {
          "id": "2",
          "name": "Baserow account"
        }
      }
    },
    {
      "parameters": {
        "batchSize": 1,
        "options": {}
      },
      "id": "2ed8af51-d6c7-45c2-b118-ff5066b84c9a",
      "name": "SplitInBatches-Advanced2",
      "type": "n8n-nodes-splitinbatches-advanced.splitInBatchesAdvanced",
      "typeVersion": 1,
      "position": [
        660,
        -20
      ],
      "notesInFlow": false,
      "executeOnce": false
    },
    {
      "parameters": {
        "batchSize": 1,
        "options": {}
      },
      "id": "d20464a5-59a2-4eaf-bf09-bce285cce492",
      "name": "SplitInBatches-Advanced3",
      "type": "n8n-nodes-splitinbatches-advanced.splitInBatchesAdvanced",
      "typeVersion": 1,
      "position": [
        1220,
        620
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "x",
              "value": "={{ $json.stdout }}"
            }
          ]
        },
        "options": {}
      },
      "id": "7643b5de-1ea2-470c-8246-5c6847218971",
      "name": "Set4",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1860,
        140
      ]
    },
    {
      "parameters": {
        "unit": "seconds"
      },
      "id": "77134701-09ba-443f-8db6-c9782ea60c48",
      "name": "Wait3",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        760,
        260
      ],
      "webhookId": "450f9508-9f9d-410a-9385-e8e9dc163acd"
    },
    {
      "parameters": {
        "unit": "seconds"
      },
      "id": "51b97d48-a96f-4b5c-b674-4583750a6fdf",
      "name": "Wait4",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        920,
        -40
      ],
      "webhookId": "1a09a354-a82e-4ddf-8c33-3a0984f89991"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apollo.io/v1/mixed_people/search",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Cache-Control",
              "value": "no-cache"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ $json[\"stdout\"] }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "c18d9ad2-b76f-48a2-85d2-f54aee8c954f",
      "name": "calling API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        2080,
        140
      ],
      "disabled": true
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "URL and number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "SplitInBatches-Advanced2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "URL and number": {
      "main": [
        [
          {
            "node": "parsing filters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "parsing filters": {
      "main": [
        [
          {
            "node": "Baserow2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "setting API key": {
      "main": [
        [
          {
            "node": "all page done check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "all page done check": {
      "main": [
        [
          {
            "node": "creating API data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "creating API data": {
      "main": [
        [
          {
            "node": "Set4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spreadsheet File": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF1": {
      "main": [
        [
          {
            "node": "setting API key",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Baserow3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Baserow2": {
      "main": [
        [
          {
            "node": "SplitInBatches-Advanced2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Baserow3": {
      "main": [
        [
          {
            "node": "SplitInBatches-Advanced3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches-Advanced2": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches-Advanced3": {
      "main": [
        [
          {
            "node": "Baserow2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set4": {
      "main": [
        [
          {
            "node": "calling API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "IF1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "SplitInBatches-Advanced3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "calling API": {
      "main": [
        [
          {
            "node": "Spreadsheet File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Share the output returned by the last node

it should again take the baserow data of 30 lines and again start from 1 making it an infinite loop, as i require it here later in workflow it is broken as per requirement

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite): baserow
  • Running n8n with the execution process [own(default), main]: webhook
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker


Here as you see the orange line after it is gone back to baserow new set of data comes but split in batch dont process it and goes into infinite loop of extracting data. I want after the baserow is again called split in batch reset and it again process those 30 entries again in the process

Hey @pranav_garg,

As this question is around a community node it would be worth reaching out to the creator of the node for support.

Luckily though the creator of that node is active here, @BramKn any thoughts buddy?

Hey @pranav_garg

Please provide an easy to read screenshot without lines going all over the place.

For what I have seen sofar you are going back from the done path. That is not the way to go as it will always go with the done path if it is not in a batch, causing a infinite loop.

Also there is multiple split in batch nodes. You cannot put those within eachother that will mess things up aswell.

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