[HubSpot Search Customer] Missing filter operators (LT/GT, LTE/GTE) for datetime fields

Describe the problem/error/question

In the HubSpot Customer Search node, it is currently not possible to select the GT/LT or GTE/LTE operator for a field with the datetime data type (e.g. Last Modified Date).

However, the following filter can be used via the HubSpot API:

{{baseUrl}}/crm/v3/objects/contacts/search

“filters”: [
        {
          “propertyName”: “lastmodifieddate”,
          “operator”: “GT”,
          “value”: “2025-07-25T11:06:43.841Z”
        }

What is the error message (if any)?

{
  "errorMessage": "Cannot read properties of undefined (reading 'cause')",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.104.1 (Cloud)",
    "binaryDataMode": "filesystem",
    "stackTrace": [
      "TypeError: Cannot read properties of undefined (reading 'cause')",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts:3057:38)",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1211:9)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1581:27",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2157:11"
    ]
  }
}

Please share your workflow

Share the output returned by the last node

[

{

"max_last_modified_date": "2025-07-25T11:06:43.841Z"

}

]

Information on your n8n setup

instance information

Debug info

core

  • n8nVersion: 1.104.1
  • platform: docker (cloud)
  • nodeJsVersion: 22.17.0
  • database: sqlite
  • executionMode: regular
  • concurrency: 20
  • license: community
  • consumerId: 00000000-0000-0000-0000-000000000000

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 720 hours
  • maxCount: 25000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64; rv:141.0) gecko/20100101 firefox/141.0
  • isTouchDevice: false

Generated at: 2025-07-29T14:35:35.648Z

If you need to filter by date fields using operators like GT, LT, or GTE, the most effective way to do this is to use the HTTP Request node:

  1. Authenticate with your HubSpot credentials in n8n.
  2. Send the JSON body correctly configured with the desired filters.
  3. Process the results obtained directly in the flow.

This avoids the limitations of the HubSpot node and allows you to take full advantage of the power of the official API.

@Erick_Torres thanks for your feedback! I have already tested the approach via HTTP request node.
The challenge here is to specify the paging in the HTTP body.
This is not included in the header for this route.
The maximum number of supported objects per page is 200.
Here is an example body:

{
  “limit”:200,
  “after”: 300,  
  “filterGroups”: [
    {
      “filters”: [
        {
          “propertyName”: “lastmodifieddate”,
          “operator”: “GT”,
          “value”: “2025-07-25T11:06:43.841Z”
        }
      ]
    }
  ],
  “sorts”: [
    {
      “propertyName”: “lastmodifieddate”,
      “direction”: “ASCENDING”
    }
  ],
  “properties”: [
    “firstname”,
    “lastname”,
    “email”
  ]
}

The response then contains:

“paging”: {
    “next”: {
        “after”: “500”
    }
}

A loop would have to be built here, because the standard http node does not provide for paging in the body.
Do you have any idea how we can solve this in n8n? I failed at this.

Furthermore, I think that a “HubSpot Search Customer” node, which is supposed to be a simple replacement for an corresponding http request, should also include all functions (filter operators) of the route. What do you think?

In the http node, you can specify the type “Body” under the Pagination option. This allows you to implement paging in the body.

1 Like

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