HTTP Request fails when pagination is enabled with "Referenced node is not executed"

Information on your n8n setup

  • n8n version: 1.53.2 (Enterprise licensing)
  • Database: Postgres
  • n8n EXECUTIONS_PROCESS setting: queue
  • Running n8n via: Docker (with 2 workers)
  • Operating system: Rocky 8.9 and Ubuntu 20.04Linux

I’m trying to use pagination to get rid of several loops and it doesn’t seem to like the SAP B1 API. Here are the details of the http request loop:

Returns the following in the body:


[
  {
    "body": 
    {
     ...
      "value": [
      {
          ...
      },
      ...
     ],
     "odata.nextLink":"GR_ActiveDefects?$filter=U_PriKey%20eq%20%27264%27&$skip=20"
    }
  }
]

Using “Update Parameter in Each Request” fails with a bad URL response from the server. Using “Response Containers Next URL” to build the full URL fails with the error below, even though the UI recognizes that the referenced node was ran (and is still valid if I debug after failure.)

Disabling paging and using loops solves the problem but, some of these workflows we are building are pretty large and handling multiple loops in a single workflow gets harder to manage in these.

Any ideas of what else I can try? I can set the max page size larger for this particular call but, at some point the result sets will get to big to handle in one request.

## Share the output returned by the last node
{
  "errorMessage": "Referenced node is unexecuted",
  "errorDetails": {
    "rawErrorMessage": [
      "Referenced node is unexecuted"
    ]
  },
  "n8nDetails": {
    "nodeName": "Get Defect DocEntries",
    "nodeType": "n8n-nodes-base.httpRequest",
    "nodeVersion": 4.1,
    "itemIndex": 0,
    "runIndex": 0,
    "time": "8/9/2024, 9:23:52 PM",
    "n8nVersion": "1.52.2 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeApiError: Referenced node is unexecuted",
      "    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1641:33)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:673:51",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1085:20"
    ]
  }
}

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @jirvan

Do you need to rebuilt the whole URL in your Next URL parameter?

Can you try to either use the first item only of the HTTP output, i.e. using .first().json instead of .item.json

Or reference the parameter value itself, so something like this:

{{ $parameter["url"] + "/" + $response.body['odata.nextLink'] }}

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