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.