How to filter range of items received from another node

my workflow to handle 5000 items. sometimes it fails due to multiple reasons
i want to handle the data from where it stopped.

I want to filter out the received items and pass only missed items.

i want to configurable function which filters items index range to be filtered- normally range 0 - n

can someone guide me here

<{
“nodes”: [
{
“parameters”: {
“functionCode”: “return [\n {\n [\n{\n"Name”: “1221e “,\n"ID”: “2232e”,\n},\n{\n"Name”: “1221e “,\n"ID”: “223e2”,\n},w\n{\n"Name”: “12e21 “,\n"ID”: “223w2”,\n},\n{\n"Name”: “1221e “,\n"ID”: “223e2”,\n},\n{\n"Name”: “1rw221 “,\n"ID”: “223re2”,\n},\n];”
},
“name”: “Mock-Data”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
-20,
400
]
},
{
“parameters”: {
“functionCode”: “return items.filter(item => {\n return item.json.myNumber === 1\n})\n”
},
“name”: “filter”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
140,
400
]
}
],
“connections”: {
“Mock-Data”: {
“main”: [
[
{
“node”: “filter”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}/>

Hey @Priya_Kumar,

Can you try using the formatting we provide in the template when pasting workflows, if you have done it right you will see an interactive version of your workflow which makes things a lot quicker.

If you just want to remove items and you know how many items it is you might be able to use the Items List node to handle it. The other option could be to use a merge node and read in the processed items and remove anything already processed.

1 Like