This works well although it seems to be adding some random stuff in there as well. (if statements, array). Made a test bot -
https://app.typebot.io/typebots/clvr6yp9t001p1522c33njzf9/edit - here and it stores this:
if(!2024-05-09T14:21:35.868Z User 1) return vsy18idbmekhzkzoi9wp93s09;
if(!vsy18idbmekhzkzoi9wp93s09) return [2024-05-09T14:21:35.868Z User 1];
if(!Array.isArray(vsy18idbmekhzkzoi9wp93s09)) return [vsy18idbmekhzkzoi9wp93s09, 2024-05-09T14:21:35.868Z User 1];
return (vsy18idbmekhzkzoi9wp93s09).concat(2024-05-09T14:21:35.868Z User 1);
I then use the api to list the results, which works, get the variable ID for the chathistory variable and try to retrieve the value but the api returns: not found:
{
"message": "Result not found",
"code": "NOT_FOUND",
"data": {
"code": "NOT_FOUND",
"httpStatus": 404,
"path": "results.getResult",
"zodError": null
}
}