Title:
Issue with Pagination – “No Path Back to Node” for endCursor
Problem
I’m looping through paginated API responses in n8n and setting endCursor for the next request. However, when I reference it in the next iteration, I get:
"variables": { "after": "[No path back to node]" }
How can I correctly pass endCursor between iterations?
What I’ve Tried
• Referencing {{$json[“endCursor”]}} and {{$node[“Set End Cursor”].json[“endCursor”]}}
• Ensuring Set End Cursor runs before the next API call
• Using an IF node to check hasNextPage before looping
Setup
• n8n version:
• Database: SQLite (default)
• Execution mode: (own/main)
• Running via: (Docker, npm, cloud, etc.)
• OS:
Question
How do I ensure endCursor is correctly passed to the next request in a loop?