Youtube api-nextPageToken

->Youtube API problem

Describe the problem/error/question

I’m using HTTP request to get video list from my playlist on youtube and save in Airtable. I’ve got problem with handling NextPageToken, to download the next page.

What is the error message ?

The returned response was identical 5x, so requests got stopped

Please share your workflow

Do you have idea how to fix it?

Information on your n8n setup

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

hello @przemom

That’s may be the root cause

And why do you have the Loop node?

You are right, loop is not necessary, I’ve modyfied it but the result is the same, error during second execution of http request.

Do not loop the Airtable node back to the HTTP node. Pagination work internally within the first execution.

I’ve deleted loop bout now pagination doesn’t work, only 50 records ale procesed

That means your pagination is set incorrectly and didn’t work before.

Try this one

I’ve modyfied the flow, still the same only 50 records processed

check where the nextPageToken resides in the response. I can’t do it as I don’t have youtube credentials.

I worked on something like this a while ago, but was not able to use the pagination feature from the HTTP request node. @barn4k ‘s idea is probably more appropriate. But if you need help or want to try what I’ve done, let me know.

Khem

I’ll share what worked for me here. You will have to modify it to meet your needs:

I’ve got an error there:

Request:
{
“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “Invalid Value”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - {"error":{"code":400,"message":"Invalid Value","errors":[{"message":"Invalid Value","domain":"global","reason":"invalid"}]}}”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeName”: “Fetch YouTube Playlist Items”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.3,
“itemIndex”: 0,
“time”: “4.01.2026, 14:25:53”,
“n8nVersion”: “1.122.5 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Bad request - please check your parameters”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1498:10)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1798:11)"
]
}
}
Error

NodeApiError: Bad request - please check your parameters
    at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1498:10)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1798:11)