Issue with sleep/wait example

I found this example: https://community.n8n.io/t/wait-node-in-workflow/73 to add a pause. (Discord doesn’t like it when I try to send multiple items in a short time)

Whenever I try to use the RSS node with it I get an error saying items not defined or not iterable. With no changes it works just fine. Here’s the example using RSS:

{
  "name": "TESTSLEEP",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const newItems = [];\nfor (const item of items[0].json) {\n  newItems.push({json: item});\n}\nreturn newItems;"
      },
      "name": "Split up",
      "type": "n8n-nodes-base.function",
      "position": [
        2310,
        3420
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "https://postman-echo.com/get",
        "responseFormat": "string",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "title",
              "value": "={{$node[\"Split up\"].data[\"id\"]  + \" : \" + Date()}}"
            }
          ]
        }
      },
      "name": "Send Requests",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2798,
        3421
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "functionCode": "const waitTimeSeconds = 3;\n\nreturn new Promise((resolve) => {\n  setTimeout(() => {\n    resolve(items);\n  }, waitTimeSeconds * 1000);\n});\n\n"
      },
      "name": "Wait",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        2638,
        3421
      ]
    },
    {
      "parameters": {},
      "name": "End",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3188,
        3571
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "batchSize": 1,
        "options": {}
      },
      "name": "SplitInBatches1",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 1,
      "position": [
        2458,
        3421
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": true,
              "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}"
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        2988,
        3571
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "https://distrowatch.com/news/dw.xml"
      },
      "name": "RSS Feed Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        2130,
        3420
      ]
    }
  ],
  "connections": {
    "Split up": {
      "main": [
        [
          {
            "node": "SplitInBatches1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Requests": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Send Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },

There is a problem with the above workflow. It can not be posted. Can you please copy and paste it again. Thanks!

{
  "name": "",
  "nodes": [
    {
      "parameters": {
        "functionCode": "const newItems = [];\nfor (const item of items[0].json) {\n  newItems.push({json: item});\n}\nreturn newItems;"
      },
      "name": "Split up",
      "type": "n8n-nodes-base.function",
      "position": [
        610,
        300
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "https://postman-echo.com/get",
        "responseFormat": "string",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "title",
              "value": "={{$node[\"Split up\"].data[\"id\"]  + \" : \" + Date()}}"
            }
          ]
        }
      },
      "name": "Send Requests",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        300
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "functionCode": "const waitTimeSeconds = 3;\n\nreturn new Promise((resolve) => {\n  setTimeout(() => {\n    resolve(items);\n  }, waitTimeSeconds * 1000);\n});\n\n"
      },
      "name": "Wait",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        940,
        300
      ]
    },
    {
      "parameters": {},
      "name": "End",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1540,
        300
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "batchSize": 1,
        "options": {}
      },
      "name": "SplitInBatches1",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 1,
      "position": [
        760,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": true,
              "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}"
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        1290,
        450
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "https://distrowatch.com/news/dw.xml"
      },
      "name": "RSS Feed Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        430,
        300
      ]
    }
  ],
  "connections": {
    "Split up": {
      "main": [
        [
          {
            "node": "SplitInBatches1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Requests": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Send Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "End",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SplitInBatches1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Read": {
      "main": [
        [
          {
            "node": "Split up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {}
}

Not sure why you have the Function-Node called “Split up”. But if you simply remove it, it will work fine.