I think it's somewhat common knowledge in the community that Power Automate doesn't handle long integers well. It awkwardly rounds any integer longer than 16 characters and completely breaks at 20+ characters.
My problem is that I am using the standard built-in HTTP action, and doing a GET request where I should receive a response like the following:
[
{
"id": 123456789012345678,
"name": "John Smith"
}
]
But the response in my raw HTTP output (before the Parse JSON action) is:
[
{
"id": 123456789012345670,
"name": "John Smith"
}
]
(If it's not immediately obvious, the last digit is changed from 8 to 0.)
Power Automate is rounding my integer before I even get a chance to tell it to handle it as an string, producing a completely wrong ID for this user.
This is an API that is provided by a 3rd party company, so I can't change the API to provide a string instead.
By chance, does anyone have a suggestion for what I could do here to get this to come through correctly? I'm a little baffled that even the raw output suffers from the same integer issue instead of truly being raw.
Solved! Go to Solution.
Perhaps I just finally had to give up and ask for help, but after troubleshooting this for most of the afternoon I discovered that this appears to just be a superficial issue with the display and not with the actual data that is stored.
To attempt to explain, here is my HTTP action output where the value is not what I expected to see:
It also appeared this way when viewing it by clicking the "Show raw outputs" arrow. So I had no way of knowing that it would be any different...
Even when I parsed it (I used {"type": "number"} here for this test case), it still appeared as though it was going to be an issue:
Then to my surprise, when I dropped it into a variable...
It actually captured the correct value:
Perhaps I just finally had to give up and ask for help, but after troubleshooting this for most of the afternoon I discovered that this appears to just be a superficial issue with the display and not with the actual data that is stored.
To attempt to explain, here is my HTTP action output where the value is not what I expected to see:
It also appeared this way when viewing it by clicking the "Show raw outputs" arrow. So I had no way of knowing that it would be any different...
Even when I parsed it (I used {"type": "number"} here for this test case), it still appeared as though it was going to be an issue:
Then to my surprise, when I dropped it into a variable...
It actually captured the correct value:
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
129 | |
50 | |
48 | |
35 | |
26 |