Need assistance setting up an HTTP node to use Pagination with GoHighLevel API 2.0

Describe the problem/error/question

I am trying to setup pagination in an HTTP node performing a search contacts query. Here is the documentation I am using that talks about Pagination (ClickUp)

What is the error message (if any)?

Bad request - please check your parameters

Error occurred while searching for contact

Please share your workflow

Share the output returned by the last node

Error code
400
Full message
400 - “{“status”:400,“message”:“Error occurred while searching for contact”,“name”:“HttpException”,“traceId”:“8d5354b7-92d2-4a22-a30e-30545406b8d4”}”
Request
{ “body”: { “locationId”: “NO66LefcZO64YxAenyBo”, “page”: 1, “pageLimit”: 500 }, “headers”: { “version”: “2021-07-28”, “accept”: “application/json”, “content-type”: “application/json” }, “method”: “POST”, “uri”: “https://services.leadconnectorhq.com/contacts/search”, “gzip”: true, “rejectUnauthorized”: true, “followRedirect”: true, “resolveWithFullResponse”: true, “followAllRedirects”: true, “timeout”: 300000, “encoding”: null, “json”: false, “useStream”: true, “qs”: {}, “simple”: false }

Information on your n8n setup

  • n8n version: [email protected]
  • Database (default: SQLite): N8N Cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows 11

Unfortunately I don’t have much time to test it, but please try if any of these will improve the situation:

Fix the JSON Body

Remove the page parameter from your JSON body:

{ "locationId": "NO66LefcZO64YxAenyBo", "pageLimit": 500 }

Correct Pagination Settings

In your HTTP Request node Options → Pagination:

Pagination Mode: Update a Parameter in Each Request
Type: Body
Name: page
Value: {{ $pageCount + 1 }}

Add Search Criteria

The GoHighLevel Search Contacts API typically requires search parameters. Update your JSON body:

{ "locationId": "NO66LefcZO64YxAenyBo", "pageLimit": 500, "query": "*" }

Or add specific search filters based on your needs

Fix Headers

Ensure your headers match GoHighLevel v2 requirements:

{ "name": "Version", "value": "2021-07-28" }

Unfortunately removing the page parameter in the JSON body did not help.

FYI - My query works with the JSON body as is if i have pagination disabled. The problem is it only returns a max of 500 contacts. I need to use pagination to retrieve all values.

Here is the API documentation if that helps: ClickUp

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