HTTP Request Tool

Describe the problem/error/question

I’m doing an API call to our ERP system to fetch a specific order. The URL and header configuration work perfectly when using a standard HTTP Request node in n8n.

However, when I attempt to execute the same call via an AI Agent using the HTTP Request Tool, I encounter an error.

What is the error message (if any)?

{
“response”: “There was an error: "Binary data is not supported"”
}

Please share your workflow

{
  "nodes": [
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "d81bda9d-ccb7-4b8c-9ece-02eb70b2f33d",
      "name": "Workflow Input Trigger"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        220,
        0
      ],
      "id": "bd252bd6-e6a5-4548-8816-dc23f35d681a",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.1,
      "position": [
        160,
        220
      ],
      "id": "36ecb496-2a00-420b-82ec-228d012b0978",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "4ZJQfA4xhF8qp1NL",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        -160
      ],
      "id": "3ab5aa8a-0551-4e43-bff4-804d5d027fdf",
      "name": "When chat message received",
      "webhookId": "1cdfb364-b97d-428c-83a2-0f46bd710e9d"
    },
    {
      "parameters": {
        "toolDescription": "Rufe ein den Auftrag 63144 auf.",
        "url": "https://637a04a74b2c1.xentral.biz/api/salesOrders/63144",
        "sendHeaders": true,
        "specifyHeaders": "json",
        "jsonHeaders": "=\n",
        "optimizeResponse": true,
        "responseType": "text"
      },
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "typeVersion": 1.1,
      "position": [
        480,
        220
      ],
      "id": "6833f987-4b88-4ebf-b847-00fe2fe294bd",
      "name": "Auftrag 63144 abrufen"
    }
  ],
  "connections": {
    "Workflow Input Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auftrag 63144 abrufen": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "1f00b6613e292a556a49f87a1c03b4a67c47ce091865b8f2a517bb3b16ece7b9"
  }
}```

## Share the output returned by the last node
<!-- If you need help with data transformations, please also share your expected output. -->

## Information on your n8n setup
- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**
1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hi,
I am experiencing the same issue.
Normal HTTP Request node, filled with the same values just works.
The AI Agent Tool HTTP Request node, with the same values, returns

{
“response”: “There was an error: “Binary data is not supported””
}

I tried to let agent fill the values, i tried to fill them manually, and I tried to use expressions to provide the names and values as strings, everything resulting with the same error message.

I guess it might be due to the fact that the reponse content-type is not advertised/returned as application/json but custom type application/custom+json;version=2.1, but it’s still plain and valid json and should be handled just fine, the same way normal HTTP Request node does.

Yes, the reason for this is

This treats everything other than expected content types as binary… Which is incorrect.
Downgrading to version 1.63.4 works fine with custom json content declarations. I’d say this is a bug.
raised an issue in github

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