Closed maxmarines closed 3 years ago
@maxmarines Had a quick look and this does not seem to be a bug. Just remove the split batches node and it should work as expected. The split batches node is not needed. the HTPP will iterate automatically over all items. Can you please confirm that it solves the issue? Thanks.
@RicardoE105 Thank you, your advice partially worked. When checking, it turned out that this function works only if the BatchSize >=2. Set Batch Size value to -1/0/1 does not allow you to send requests one at a time and all requests are sent together, with no set delay.
New WorkFlow without Split-Batches node
{ "name": "", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ -310, 500 ] }, { "parameters": { "url": "https://news.ycombinator.com/", "responseFormat": "string", "options": {} }, "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "position": [ -170, 520 ], "typeVersion": 1 }, { "parameters": { "extractionValues": { "values": [ { "key": "item", "cssSelector": "tr.athing", "returnValue": "html", "returnArray": true } ] }, "options": {} }, "name": "HTML Extract Items", "type": "n8n-nodes-base.htmlExtract", "position": [ 30, 520 ], "typeVersion": 1 }, { "parameters": { "dataPropertyName": "item", "extractionValues": { "values": [ { "key": "title", "cssSelector": "a" }, { "key": "url", "cssSelector": "a.storylink", "returnValue": "attribute", "attribute": "href" }, { "key": "rank", "cssSelector": ".rank" } ] }, "options": { "trimValues": true } }, "name": "HTML Extract Data", "type": "n8n-nodes-base.htmlExtract", "position": [ 220, 510 ], "typeVersion": 1 }, { "parameters": { "url": "https://webhook.site/8e0a006a-099a-48d1-b300-824f3c3ec3ef", "options": { "batchInterval": 2000, "batchSize": 3 }, "queryParametersUi": { "parameter": [ {} ] } }, "name": "HTTP Request2", "type": "n8n-nodes-base.httpRequest", "typeVersion": 1, "position": [ 680, 450 ] } ], "connections": { "HTTP Request": { "main": [ [ { "node": "HTML Extract Items", "type": "main", "index": 0 } ] ] }, "HTML Extract Data": { "main": [ [ { "node": "HTTP Request2", "type": "main", "index": 0 } ] ] }, "HTML Extract Items": { "main": [ [ { "node": "HTML Extract Data", "type": "main", "index": 0 } ] ] }, "Start": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": {} }
Got fixed and will be released with the next version.
Got released with n8n@0.101.0
Describe the bug Batch Size / Interval not working if BatchSize items >2 in HTTP Request node.
To Reproduce Steps to reproduce the behavior:
Expected behavior Batch Interval between all 5 requests.
Environment (please complete the following information):
Additional info: my WorkFlow code
{ "name": "Parse", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 280, 80 ] }, { "parameters": { "url": "https://news.ycombinator.com/", "responseFormat": "string", "options": {} }, "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "position": [ 460, 100 ], "typeVersion": 1 }, { "parameters": { "extractionValues": { "values": [ { "key": "item", "cssSelector": "tr.athing", "returnValue": "html", "returnArray": true } ] }, "options": {} }, "name": "HTML Extract Items", "type": "n8n-nodes-base.htmlExtract", "position": [ 660, 100 ], "typeVersion": 1 }, { "parameters": { "dataPropertyName": "item", "extractionValues": { "values": [ { "key": "title", "cssSelector": "a" }, { "key": "url", "cssSelector": "a.storylink", "returnValue": "attribute", "attribute": "href" }, { "key": "rank", "cssSelector": ".rank" } ] }, "options": {} }, "name": "HTML Extract Data", "type": "n8n-nodes-base.htmlExtract", "position": [ 850, 90 ], "typeVersion": 1 }, { "parameters": { "batchSize": 5, "options": { "reset": false } }, "name": "SplitInBatches1", "type": "n8n-nodes-base.splitInBatches", "typeVersion": 1, "position": [ 1080, 30 ] }, { "parameters": { "url": "https://webhook.site/8e0a006a-099a-48d1-b300-824f3c3ec3ef", "options": { "batchInterval": 2000, "batchSize": 5 } }, "name": "HTTP Request2", "type": "n8n-nodes-base.httpRequest", "typeVersion": 1, "position": [ 1310, 30 ] } ], "connections": { "HTTP Request": { "main": [ [ { "node": "HTML Extract Items", "type": "main", "index": 0 } ] ] }, "HTML Extract Data": { "main": [ [ { "node": "SplitInBatches1", "type": "main", "index": 0 } ] ] }, "HTML Extract Items": { "main": [ [ { "node": "HTML Extract Data", "type": "main", "index": 0 } ] ] }, "SplitInBatches1": { "main": [ [ { "node": "HTTP Request2", "type": "main", "index": 0 } ] ] }, "Start": { "main": [ [] ] } }, "active": false, "settings": {}, "id": "51" }
for test localhost please go to https://webhook.site/ , copy your unique URL and set in URL in HTTP Request2 (last node in workflow).