Http Request API not working as expected (Output Wrong)

Randomly run into this issue with a http request to stable in which the response is returned not in JSON, and the AI simply can’t understand the text.

The tool connected to the agent is for searching for and retrieving an access token associated with the user ID.

When the http request is in a node by itself it returns the JSON formatted as normal.

Must be a bug surely.

##Current Output

response": 
"{\n  "rows": [\n    {\n      "Name": "Billy Bob",\n      "chatID": 6163060301,\n      "access_token": "THAAPbe5ORJM1BYlVSQVpURTg0ZAHhnM1VnYl9EN2NBU2RFZAElJVEx2WGhuX3BJd0xSZA2ZAFNmVFOXVzUTdzOWozYm1XR18tYTl3cjM4TzNZASDBSNlBQd2lyMGlTSWViWlp0NndGRUstTWhUVXVKWHU2WXF1VmtYWWR1em1GTlhxeGswZAwZDZDr",\n      "_locked": null,\n      "_locked_by": null,\n      "_archived": false,\n      "_creator": "[email protected]",\n      "_ctime": "2025-03-19T09:27:48.203+01:00",\n      "_last_modifier": "[email protected]",\n      "_mtime": "2025-03-19T09:27:51.357+01:00",\n      "_id": "dlRKgk2oT5W9yPun7vqRAQ"\n    },\n    {\n      "Name": "Beadle10",\n      "chatID": 6163060305,\n      "access_token": "THAAPbe5ORJM1BYlZAzUmhOMTc5UjM4Qlp4eFlIME1OZAk12eXdWbjR4N1pnRERQQ2plTU51ODZATeXpicnhpTnlwWGZARRXJoc1FYeXdzWVZASSnR6Q21OM1hUSUNEdk8zTGgtSEN3Tmt4WDRDMDYwRVJUWDNWdHp6cDY2ZAEFwZAGxySzaaaaZAZAUQZDZD",\n      "_locked": null,\n      "_locked_by": null,\n      "_archived": false,\n      "_creator": 

##Expected Output

"rows": 
[
{
"Name": 
"Billy Bob",
"chatID": 
6163060301,
"access_token": 
"THAAPbe5ORJM1BYlVSQVpURTg0ZAHhnM1VnYl9EN2NBU2RFZAElJVEx2WGhuX3BJd0xSZA2ZAFNmVFOXVzUTdzOWozYm1XR18tYTl3cjM4TzNZASDBSNlBQd2lyMGlTSWViWlp0NndGRUstTWhUVXVKWHU2WXF1VmtYWWR1em1GTlhxeGswZAwZDZDr",
"_locked": 
null,
"_locked_by": 
null,
"_archived": 
false,
"_creator": 
"[email protected]",
"_ctime": 
"2025-03-19T09:27:48.203+01:00",
"_last_modifier": 
"[email protected]",
"_mtime": 
"2025-03-19T09:27:51.357+01:00",
"_id": 
"dlRKgk2oT5W9yPun7vqRAQ"
},

Information on your n8n setup

  • n8n version: Latest
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker
  • Operating system: Mac

hello @beadle

try to set the JSON for the HTTP Requests AI node explicitly

Still hasn’t fixed the issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.