Possible bug with Filter node or interaction with HubSpot node

Describe the problem/error/question

I’m adding a 2nd Condition to my Filter node and a couple weird things are happening. I drag/drop “ownerId” over and its displaying the wrong number in the “Result for item 1” value but it’s displaying the correct number in the error text! I triple checked and it is a numeric but the error says it’s a string.

What is the error message (if any)?

Wrong type: ‘49059687’ is a number but was expecting a string [condition 1, item 19]

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

{
“errorMessage”: “Wrong type: ‘49059687’ is a number but was expecting a string [condition 1, item 19]”,
“errorDescription”: “Try changing the type of comparison. Alternatively you can enable ‘Less Strict Type Validation’ in the options.”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Filter”,
“nodeType”: “n8n-nodes-base.filter”,
“nodeVersion”: 2,
“itemIndex”: 19,
“time”: “4/12/2024, 3:35:27 PM”,
“n8nVersion”: “1.36.1 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: Wrong type: ‘49059687’ is a number but was expecting a string [condition 1, item 19]”,
" at extractValue (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/ExtractValue.ts:205:9)“,
" at getNodeParameter (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:2392:28)”,
" at Object.getNodeParameter (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:3575:12)“,
" at /usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Filter/V2/FilterV2.node.ts:78:18”,
" at Array.forEach ()“,
" at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Filter/V2/FilterV2.node.ts:70:23)”,
" at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1377:31)“,
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1048:44”,
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1724:11"
]
}
}

Information on your n8n setup

  • n8n version: 1.36.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm?
  • Operating system: Ubuntu Linux 22.04

@tim.berneman , I encountered the very same issue (with my own workflow) too. Making sure “Less Strict Type Validation” option is enabled seems to have helped.

image

1 Like

As your screenshot indicates, the type you have chosen for the second condition is String . Simply choose Number , and the issue will be resolved.

I had it set to Numeric at first and that failed with that error message. I then switched it to Alphanumeric and saw the same error.

Can you show the error when you use Numeric type?

Here is a screenshot of the error as Numeric type.

Turning on “Less String Type Validation” like @ihortom suggested works great though!

This solution worked great!

Thanks @ihortom

Just curious, could you please check what type of ownerId is at index 19?

All ownerId’s are numeric. I downloaded the JSON file results and searched ownerId.
||Line 12: ownerId: 48880646,|
||Line 104: ownerId: 48880646,|
||Line 194: ownerId: 48880646,|
||Line 284: ownerId: 48880646,|
||Line 344: ownerId: 48880646,|
||Line 433: ownerId: 48880646,|
||Line 524: ownerId: 48880646,|
||Line 614: ownerId: 48880646,|
||Line 702: ownerId: 48880646,|
||Line 835: ownerId: 48880646,|
||Line 891: ownerId: 48880646,|
||Line 949: ownerId: 48880646,|
||Line 1007: ownerId: 48880646,|
||Line 1064: ownerId: 48880646,|
||Line 1163: ownerId: 48880646,|
||Line 1260: ownerId: 48880646,|
||Line 1359: ownerId: 48880646,|
||Line 1446: ownerId: 49059687,|
||Line 1500: ownerId: 49059687,|
||Line 1552: ownerId: 49059687,|
||Line 1600: ownerId: 49059687,|
||Line 1652: ownerId: 48880646,|
||Line 1740: ownerId: 48880646,|
||Line 1830: ownerId: 49059687,|
||Line 1877: ownerId: 48880646,|
||Line 1968: ownerId: 48880646,|
||Line 2058: ownerId: 49059687,|
||Line 2107: ownerId: 48880646,|
||Line 2198: ownerId: 49059687,|
||Line 2245: ownerId: 48880646,|
||Line 2335: ownerId: 48880646,|
||Line 2443: ownerId: 48880646,|
||Line 2539: ownerId: 48880646,|
||Line 2644: ownerId: 48880646,|
||Line 2750: ownerId: 48880646,|
||Line 2838: ownerId: 48880646,|
||Line 2925: ownerId: 48880646,|
||Line 3020: ownerId: 48880646,|
||Line 3108: ownerId: 48880646,|
||Line 3196: ownerId: 48880646,|
||Line 3292: ownerId: 49059687,|
||Line 3341: ownerId: 48880646,|
||Line 3431: ownerId: 48880646,|
||Line 3521: ownerId: 48880646,|
||Line 3613: ownerId: 48880646,|
||Line 3710: ownerId: 48880646,|
||Line 3808: ownerId: 48880646,|
||Line 3896: ownerId: 48880646,|
||Line 3982: ownerId: 48880646,|
||Line 4073: ownerId: 48880646,|
||Line 4166: ownerId: 48880646,|
||Line 4256: ownerId: 48880646,|
||Line 4344: ownerId: 48880646,|
||Line 4458: ownerId: 48880646,|
||Line 4546: ownerId: 48880646,|
||Line 4634: ownerId: 48880646,|
||Line 4722: ownerId: 49059687,|
||Line 4771: ownerId: 48880646,|
||Line 4829: ownerId: 48880646,|
||Line 4917: ownerId: 48880646,|
||Line 5022: ownerId: 49059687,|
||Line 5069: ownerId: 49059687,|
||Line 5116: ownerId: 49059687,|
||Line 5166: ownerId: 48880646,|
||Line 5280: ownerId: 48880646,|
||Line 5394: ownerId: 48880646,|
||Line 5482: ownerId: 49059687,|
||Line 5531: ownerId: 49384207,|
||Line 5576: ownerId: 49384207,|
||Line 5631: ownerId: 49384207,|
||Line 5677: ownerId: 49384207,|
||Line 5722: ownerId: 49384207,|
||Line 5776: ownerId: 49384207,|
||Line 5831: ownerId: 48880646,|
||Line 5924: ownerId: 49384207,|
||Line 5977: ownerId: 48880646,|
||Line 6073: ownerId: 49059687,|
||Line 6122: ownerId: 48880646,|
||Line 6220: ownerId: 48880646,|
||Line 6364: ownerId: 48880646,|
||Line 6500: ownerId: 48880646,|
||Line 6596: ownerId: 48880646,|
||Line 6692: ownerId: 48880646,|
||Line 6829: ownerId: 48880646,|
||Line 6925: ownerId: 48880646,|
||Line 7013: ownerId: 48880646,|
||Line 7101: ownerId: 48880646,|
||Line 7189: ownerId: 48880646,|
||Line 7275: ownerId: 48880646,|
||Line 7363: ownerId: 48880646,|
||Line 7451: ownerId: 48880646,|
||Line 7537: ownerId: 48880646,|
||Line 7623: ownerId: 48880646,|
||Line 7711: ownerId: 48880646,|
||Line 7798: ownerId: 48880646,|
||Line 7882: ownerId: 48880646,|
||Line 7968: ownerId: 49384207,|
||Line 8014: ownerId: 49384207,|
||Line 8060: ownerId: 48880646,|

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