Pagination - Total Number of Items Unknown

:bullseye: What is your goal?

I have been studying Pagination from Make Advanced course and following the steps mentioned in the course regarding building a scenario to add image urls from Pexels API with pagination implemented considering total number of items unknown.

:thinking: What is the problem?

I am getting the following error in HTTP - Make a request module. Screenshot is attached.

:test_tube: What have you tried so far?

Tried checking URL, and modules due to which error can come. Made changes in the queries but nothing worked. Would request if anyone could help with this ?

:camera_with_flash: Screenshots: scenario setup, module configuration, errors

Hey there,

Can you show the original message and not what the AI hallucinated? Can you also show how the module was configured?

Welcome to the Make community!

It appears that you are doing the Pagination - retrieving all data from APIs course, in particular, the unit “Unit 3 - Pagination - total number of items unknown”.

In the unit, here’s the example flow provided:

Ensure that the variable used for all the Set & Get Variable modules are exactly the same, e.g.: next_page.


Ensure that you are mapping the next page URL of the HTTP module:

Ensure that your filter before the HTTP module is correctly set:

Hope this helps! If you are still having trouble, please provide more details.

— @samliew

Thanks for your response @samliew . However, I checked everything as mentioned by you but still getting same error.

Hi @Stoyan_Vatov
Thanks for your response. I will attach more screenshots for your reference.

Please attach a copy of your scenario’s blueprint export here (do not link to it).

@samliew Here is the blueprint of scenario -
{
“name”: “MA_C03_U03”,
“flow”: [
{
“id”: 2,
“module”: “util:SetVariables”,
“version”: 1,
“parameters”: {},
“mapper”: {
“variables”: [
{
“name”: “page_url”,
“value”: “https://api.pexels.com/v1/search”
}
],
“scope”: “roundtrip”
},
“metadata”: {
“designer”: {
“x”: 0,
“y”: 0,
“name”: “Initial_URL”
},
“restore”: {
“expect”: {
“variables”: {
“items”: [
null
]
},
“scope”: {
“label”: “One cycle”
}
}
},
“expect”: [
{
“name”: “variables”,
“type”: “array”,
“label”: “Variables”,
“validate”: {
“unique”: {
“by”: “name”
}
},
“spec”: {
“type”: “collection”,
“label”: “Variable”,
“spec”: [
{
“name”: “name”,
“label”: “Variable name”,
“type”: “text”,
“required”: true
},
{
“name”: “value”,
“label”: “Variable value”,
“type”: “any”
}
],
“name”: “value”
}
},
{
“name”: “scope”,
“type”: “select”,
“label”: “Variable lifetime”,
“required”: true,
“validate”: {
“enum”: [
“roundtrip”,
“execution”
]
}
}
],
“interface”: [
{
“name”: “page_url”,
“label”: “page_url”,
“type”: “any”
}
]
}
},
{
“id”: 3,
“module”: “builtin:BasicRepeater”,
“version”: 1,
“parameters”: {},
“mapper”: {
“step”: “1”,
“start”: “1”,
“repeats”: “40”
},
“metadata”: {
“designer”: {
“x”: 300,
“y”: 0
},
“restore”: {},
“expect”: [
{
“name”: “start”,
“type”: “number”,
“label”: “Initial value”,
“required”: true
},
{
“name”: “repeats”,
“type”: “number”,
“label”: “Repeats”,
“required”: true,
“validate”: {
“max”: 10000,
“min”: 0
}
},
{
“name”: “step”,
“type”: “number”,
“label”: “Step”,
“required”: true
}
]
}
},
{
“id”: 4,
“module”: “util:GetVariables”,
“version”: 1,
“parameters”: {},
“mapper”: {
“variables”: [
“page_url”
]
},
“metadata”: {
“designer”: {
“x”: 600,
“y”: 0,
“name”: “Get page_url”
},
“restore”: {
“expect”: {
“variables”: {
“items”: [
null
]
}
}
},
“expect”: [
{
“name”: “variables”,
“spec”: {
“name”: “value”,
“type”: “text”,
“label”: “Variable name”,
“required”: true
},
“type”: “array”,
“label”: “Variables”,
“validate”: {
“unique”: true
}
}
],
“interface”: [
{
“name”: “page_url”,
“type”: “any”,
“label”: “page_url”
}
]
}
},
{
“id”: 5,
“module”: “http:MakeRequest”,
“version”: 4,
“parameters”: {
“tlsType”: “”,
“apiKeyKeychain”: 215567,
“authenticationType”: “apiKey”
},
“filter”: {
“name”: “Next page available”,
“conditions”: [
[
{
“a”: “{{4.page_url}}”,
“b”: “STOP”,
“o”: “text:notequal”
}
]
]
},
“mapper”: {
“url”: “{{4.page_url}}”,
“method”: “get”,
“shareCookies”: false,
“parseResponse”: true,
“allowRedirects”: true,
“queryParameters”: [
{
“name”: “query”,
“value”: “Rome”
}
],
“stopOnHttpError”: true,
“requestCompressedContent”: true
},
“metadata”: {
“designer”: {
“x”: 900,
“y”: 0
},
“restore”: {
“expect”: {
“method”: {
“mode”: “chose”,
“label”: “GET”
},
“headers”: {
“mode”: “chose”
},
“contentType”: {
“label”: “Empty”
},
“shareCookies”: {
“mode”: “chose”
},
“parseResponse”: {
“mode”: “chose”
},
“allowRedirects”: {
“mode”: “chose”
},
“paginationType”: {
“label”: “Empty”
},
“queryParameters”: {
“mode”: “chose”,
“items”: [
null
]
},
“stopOnHttpError”: {
“mode”: “chose”
},
“requestCompressedContent”: {
“mode”: “chose”
}
},
“parameters”: {
“tlsType”: {
“label”: “Empty”
},
“apiKeyKeychain”: {
“label”: “Pexels”
},
“authenticationType”: {
“label”: “API keyUse when the service requires an API key in the header or query parameters.”
}
}
},
“parameters”: [
{
“name”: “authenticationType”,
“type”: “select”,
“label”: “Authentication type”,
“required”: true,
“validate”: {
“enum”: [
“noAuth”,
“apiKey”,
“basicAuth”,
“oAuth”
]
}
},
{
“name”: “tlsType”,
“type”: “select”,
“label”: “Transport layer security (TLS)”,
“validate”: {
“enum”: [
“mTls”,
“tls”
]
}
},
{
“name”: “proxyKeychain”,
“type”: “keychain:proxy”,
“label”: “Proxy”
},
{
“name”: “apiKeyKeychain”,
“type”: “keychain:apikeyauth”,
“label”: “Credentials”,
“required”: true
}
],
“expect”: [
{
“name”: “url”,
“type”: “url”,
“label”: “URL”,
“required”: true
},
{
“name”: “method”,
“type”: “select”,
“label”: “Method”,
“required”: true,
“validate”: {
“enum”: [
“get”,
“head”,
“post”,
“put”,
“patch”,
“delete”,
“options”
]
}
},
{
“name”: “headers”,
“spec”: {
“name”: “value”,
“spec”: [
{
“name”: “name”,
“type”: “text”,
“label”: “Name”,
“required”: true,
“validate”: {
“pattern”: “[1]+$”
}
},
{
“name”: “value”,
“type”: “text”,
“label”: “Value”
}
],
“type”: “collection”,
“label”: “Header”
},
“type”: “array”,
“label”: “Headers”
},
{
“name”: “queryParameters”,
“spec”: {
“name”: “value”,
“spec”: [
{
“name”: “name”,
“type”: “text”,
“label”: “Name”,
“required”: true
},
{
“name”: “value”,
“type”: “text”,
“label”: “Value”
}
],
“type”: “collection”,
“label”: “Parameter”
},
“type”: “array”,
“label”: “Query parameters”
},
{
“name”: “contentType”,
“type”: “select”,
“label”: “Body content type”,
“validate”: {
“enum”: [
“json”,
“multipart”,
“urlEncoded”,
“custom”
]
}
},
{
“name”: “parseResponse”,
“type”: “boolean”,
“label”: “Parse response”,
“required”: true
},
{
“name”: “stopOnHttpError”,
“type”: “boolean”,
“label”: “Return error if HTTP request fails”,
“required”: true
},
{
“name”: “timeout”,
“type”: “uinteger”,
“label”: “Timeout”,
“validate”: {
“max”: 300,
“min”: 1
}
},
{
“name”: “allowRedirects”,
“type”: “boolean”,
“label”: “Allow redirects”,
“required”: true
},
{
“name”: “shareCookies”,
“type”: “boolean”,
“label”: “Share cookies with other HTTP modules”,
“required”: true
},
{
“name”: “requestCompressedContent”,
“type”: “boolean”,
“label”: “Request compressed content”,
“required”: true
},
{
“name”: “paginationType”,
“type”: “select”,
“label”: “Pagination type”,
“validate”: {
“enum”: [
“offsetBased”,
“pageBased”,
“urlBased”,
“tokenBased”
]
}
}
],
“interface”: [
{
“name”: “data”,
“type”: “any”,
“label”: “Data”
},
{
“name”: “statusCode”,
“type”: “number”,
“label”: “Status Code”
},
{
“name”: “headers”,
“spec”: [
{
“name”: “content-length”,
“type”: “text”,
“label”: “Content-Length”
},
{
“name”: “content-encoding”,
“type”: “text”,
“label”: “Content-Encoding”
},
{
“name”: “content-type”,
“type”: “text”,
“label”: “Content-Type”
},
{
“name”: “server”,
“type”: “text”,
“label”: “Server”
},
{
“name”: “cache-control”,
“type”: “text”,
“label”: “Cache-Control”
},
{
“name”: “set-cookie”,
“spec”: {
“type”: “text”
},
“type”: “array”,
“label”: “Set-Cookie”
}
],
“type”: “collection”,
“label”: “Headers”
}
]
}
},
{
“id”: 6,
“module”: “util:SetVariables”,
“version”: 1,
“parameters”: {},
“mapper”: {
“scope”: “roundtrip”,
“variables”: [
{
“name”: “page_url”,
“value”: “{{ifempty(5.data.next_page; “STOP”)}}”
}
]
},
“metadata”: {
“designer”: {
“x”: 1200,
“y”: 0,
“name”: “Next page”
},
“restore”: {
“expect”: {
“scope”: {
“label”: “One cycle”
},
“variables”: {
“items”: [
null
]
}
}
},
“expect”: [
{
“name”: “variables”,
“spec”: {
“name”: “value”,
“spec”: [
{
“name”: “name”,
“type”: “text”,
“label”: “Variable name”,
“required”: true
},
{
“name”: “value”,
“type”: “any”,
“label”: “Variable value”
}
],
“type”: “collection”,
“label”: “Variable”
},
“type”: “array”,
“label”: “Variables”,
“validate”: {
“unique”: {
“by”: “name”
}
}
},
{
“name”: “scope”,
“type”: “select”,
“label”: “Variable lifetime”,
“required”: true,
“validate”: {
“enum”: [
“roundtrip”,
“execution”
]
}
}
],
“interface”: [
{
“name”: “page_url”,
“type”: “any”,
“label”: “page_url”
}
]
}
},
{
“id”: 7,
“module”: “builtin:BasicFeeder”,
“version”: 1,
“parameters”: {},
“mapper”: {
“array”: “{{5.data.photos}}”
},
“metadata”: {
“designer”: {
“x”: 1500,
“y”: 0
},
“restore”: {
“expect”: {
“array”: {
“mode”: “edit”
}
}
},
“expect”: [
{
“mode”: “edit”,
“name”: “array”,
“spec”: ,
“type”: “array”,
“label”: “Array”
}
]
}
},
{
“id”: 8,
“module”: “google-sheets:addRow”,
“version”: 2,
“parameters”: {
“IMTCONN”: 9842227
},
“mapper”: {
“from”: “drive”,
“mode”: “select”,
“values”: {
“0”: “{{7.src.original}}”,
“1”: “{{7.alt}}”
},
“sheetId”: “Exercise_3”,
“spreadsheetId”: “/1iD31DKXBswjl2wCcG8S4W9DlmY2VrPoYzkOAnUVV9us”,
“includesHeaders”: true,
“insertDataOption”: “INSERT_ROWS”,
“useColumnHeaders”: false,
“valueInputOption”: “USER_ENTERED”,
“insertUnformatted”: false
},
“metadata”: {
“designer”: {
“x”: 1800,
“y”: 0
},
“restore”: {
“expect”: {
“from”: {
“label”: “My Drive”
},
“mode”: {
“label”: “Search by path”
},
“sheetId”: {
“label”: “Exercise_3”
},
“spreadsheetId”: {
“path”: [
“MAC03_U02”
]
},
“includesHeaders”: {
“label”: “Yes”
},
“insertDataOption”: {
“mode”: “chose”,
“label”: “Insert rows”
},
“useColumnHeaders”: {
“label”: “No”
},
“valueInputOption”: {
“mode”: “chose”,
“label”: “User entered”
},
“insertUnformatted”: {
“mode”: “chose”
}
},
“parameters”: {
“IMTCONN”: {
“data”: {
“scoped”: “true”,
“connection”: “google”
},
“label”: “My Google connection ([email protected])”
}
}
},
“parameters”: [
{
“name”: “IMTCONN”,
“type”: “account:google”,
“label”: “Connection”,
“required”: true
}
],
“expect”: [
{
“name”: “mode”,
“type”: “select”,
“label”: “Search Method”,
“required”: true,
“validate”: {
“enum”: [
“select”,
“fromAll”,
“map”
]
}
},
{
“name”: “insertUnformatted”,
“type”: “boolean”,
“label”: “Unformatted”,
“required”: true
},
{
“name”: “valueInputOption”,
“type”: “select”,
“label”: “Value input option”,
“required”: true,
“validate”: {
“enum”: [
“USER_ENTERED”,
“RAW”
]
}
},
{
“name”: “insertDataOption”,
“type”: “select”,
“label”: “Insert data option”,
“validate”: {
“enum”: [
“INSERT_ROWS”,
“OVERWRITE”
]
}
},
{
“name”: “from”,
“type”: “select”,
“label”: “Drive”,
“required”: true,
“validate”: {
“enum”: [
“drive”,
“share”,
“team”
]
}
},
{
“name”: “spreadsheetId”,
“type”: “file”,
“label”: “Spreadsheet Name”,
“required”: true
},
{
“name”: “sheetId”,
“type”: “select”,
“label”: “Sheet Name”,
“required”: true
},
{
“name”: “includesHeaders”,
“type”: “select”,
“label”: “Table contains headers”,
“required”: true,
“validate”: {
“enum”: [
true,
false
]
}
},
{
“name”: “useColumnHeaders”,
“type”: “select”,
“label”: “Use column headers as IDs of the columns”,
“required”: true,
“validate”: {
“enum”: [
true,
false
]
}
},
{
“name”: “values”,
“spec”: [
{
“name”: “0”,
“type”: “text”,
“label”: “Image URL (A)”
},
{
“name”: “1”,
“type”: “text”,
“label”: “Image description (B)”
},
{
“name”: “2”,
“type”: “text”,
“label”: “(C)”
},
{
“name”: “3”,
“type”: “text”,
“label”: “(D)”
},
{
“name”: “4”,
“type”: “text”,
“label”: “(E)”
},
{
“name”: “5”,
“type”: “text”,
“label”: “(F)”
},
{
“name”: “6”,
“type”: “text”,
“label”: “(G)”
},
{
“name”: “7”,
“type”: “text”,
“label”: “(H)”
},
{
“name”: “8”,
“type”: “text”,
“label”: “(I)”
},
{
“name”: “9”,
“type”: “text”,
“label”: “(J)”
},
{
“name”: “10”,
“type”: “text”,
“label”: “(K)”
},
{
“name”: “11”,
“type”: “text”,
“label”: “(L)”
},
{
“name”: “12”,
“type”: “text”,
“label”: “(M)”
},
{
“name”: “13”,
“type”: “text”,
“label”: “(N)”
},
{
“name”: “14”,
“type”: “text”,
“label”: “(O)”
},
{
“name”: “15”,
“type”: “text”,
“label”: “(P)”
},
{
“name”: “16”,
“type”: “text”,
“label”: “(Q)”
},
{
“name”: “17”,
“type”: “text”,
“label”: “(R)”
},
{
“name”: “18”,
“type”: “text”,
“label”: “(S)”
},
{
“name”: “19”,
“type”: “text”,
“label”: “(T)”
},
{
“name”: “20”,
“type”: “text”,
“label”: “(U)”
},
{
“name”: “21”,
“type”: “text”,
“label”: “(V)”
},
{
“name”: “22”,
“type”: “text”,
“label”: “(W)”
},
{
“name”: “23”,
“type”: “text”,
“label”: “(X)”
},
{
“name”: “24”,
“type”: “text”,
“label”: “(Y)”
},
{
“name”: “25”,
“type”: “text”,
“label”: “(Z)”
}
],
“type”: “collection”,
“label”: “Values in columns”,
“metadata”: [
[
[
“Image URL”,
“Image description”
]
]
]
}
]
}
}
],
“metadata”: {
“instant”: false,
“version”: 1,
“scenario”: {
“roundtrips”: 1,
“maxErrors”: 3,
“autoCommit”: true,
“autoCommitTriggerLast”: true,
“sequential”: false,
“slots”: null,
“confidential”: false,
“dataloss”: false,
“dlq”: false,
“freshVariables”: false
},
“designer”: {
“orphans”:
},
“zone”: “us2.make.com”,
“notes”:
}
}


  1. -!#$%&'*+.^_`|~0-9A-Za-z ↩︎

Looks like the issue is coming from Pexel’s end:
image

You’ll just have to use the replace function to remove the extra /v1 from the next page URL:

Hope this helps! If you are still having trouble, please provide more details.

— @samliew

Thanks @samliew . I have tried this previously and again tried now after your response. However, still I am getting the same error.

Please produce screenshot evidence that the URL being passed to your HTTP module does not contain the duplicate /v1.

You are right the next url contains duplicate /v1. However, I have implemented the removal of extra /v1 function but still I am getting error.