JSON parsed differently when run on Server

We encounter a very strange behavior when using REST APIs in Workflows. The API Endpoint returns a JSON representation of a table:

{
    "Columns": [
        {
            "Name": "Column 1",
            "Type": "String",
            "CellIndex": 0
        },
        {
            "Name": "Column 2",
            "Type": "String",
            "CellIndex": 1
        },
        ...
    ],
    "Rows": [
        {
            "Cells": [
                "Cell 1",
                "Cell 2",
                ...
            ]
        },
        ...
    ]
}

When running the workflow steps through the GUI, the returned object (automatically parsed by the RESTQuery step) matches the JSON received from the API. When running the Workflow on the server (by triggering manually or using a scheduled trigger) the returned object somehow no longer matches the JSON from the API:

[
    {
        "Columns": {
            "Name": "Column 1",
            "Type": "String",
            "CellIndex": 0
        },
        "Rows": {
            "Cells": [
                "Cell 1",
                "Cell 2",
                ...
            ]
        }
    },
    {
        "Columns": {
            "Name": "Column 2",
            "Type": "String",
            "CellIndex": 0
        },
        "Rows": {
            "Cells": [
                "Cell 1",
                "Cell 2",
                ...
            ]
        }
    },
    ...
]

As you can see the returned data is somehow converted to an array combining "Rows" and "Columns". We really have no clue how this can happen. Maybe some AI which identifies some pattern and reformats the data?

Additional note: The workflow has been working correctly until the 3rd of October. This behavior was first encountered on the 9th of October. We are using Retool Cloud.

Hey Simon! Would you mind sharing a screenshot of the API call that's returning this data?

Client side execution:

Server side execution:

The returned raw JSON data is the same on both sides. But the returned parsed JSON data differs between the client and server side. The server seems to make some strange assumptions and reformats the returned data.

To overcome this we currently use a custom code block making the request manually through python, which works correctly on client and server side.

Hey Simon! Sorry for disappearing into the ether here. I saw that you mentioned you were able to workaround the issue, so I didn't prioritize getting a response out, but I've spoken to our Workflows team a couple times about your post. We don't have any good leads, but if you'd like to dig in further together, I'd be happy to dig with you! Let me know :slight_smile: