Why Long IDs Lose Their Last Digits in Automations
A record ID longer than 16 digits loses its last digits when any step parses it as a JavaScript number, because JavaScript numbers hold integers exactly only up to 9,007,199,254,740,991 (2 to the 53rd minus 1). The value is rounded to the nearest number JavaScript can store, so the result is a different, valid-looking ID that does not always end in zeros, and no step reports an error. The fix is to keep IDs as strings from the very first hop, because the damage usually happens at the trigger, before any step you can edit.
Frequently Asked Questions
SOURCES & CITATIONS
- Number.MAX_SAFE_INTEGER — MDN Web Docshttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
- X IDs — X Developer Platformhttps://docs.x.com/fundamentals/x-ids
- API Reference: Snowflakes — Discord Developer Docshttps://docs.discord.com/developers/reference
- Telegram Bot API — Telegramhttps://core.telegram.org/bots/api
About Alexey Yushkin
Alexey is the founder of GENERAL INFORMATICS LLC. He designs and ships AI and automation systems for businesses and operators across the US.
Related reading
Want this kind of system in your business?
We build practical AI and automation systems for operators. Send us your current workflow and we will show you what to automate first.
