How to compare 2 integers longer than 16 numbers

Describe the problem/error/question

I have numbers longer than 16 characters in my database that I need to use in n8n, mainly to compare which is bigger. But, since they are greater than JavaScripts max integer value, n8n represents them incorrectly. How can I use them in a filter to correctly compare which is bigger, and/or read then use the value in a HTTP request.

What is the error message (if any)?

The HTTP Request doesnt recognize the value because N8N displays the last 3 numbers as 0.

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

Information on your n8n setup

  • n8n version:0.222.3
  • Database (default: SQLite): SupaBase
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system:ubuntu

Hey @Boden_Club_Ltda,

Welcome to the community :raised_hands:

That is a good question, As n8n runs on NodeJS we would have the same max int issue, We do now support python in the code node though so you may be able to use that to do the comparison and output a bool and work from there.

1 Like

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