When enabling "Optimise Response" option for HTML in the HTTP request tool, the user recieves the following error as tool output. This prevents the AI agent from using the tool correctly.
{
"response": "There was an error: \"Cannot read properties of undefined (reading 'load')\""
}
Disabling the "Optimise Response" option allows the tool to function as expected.
With "Optimise Response" option
Without "Optimise Response" option
HTTP Request Tool Options
To Reproduce
Create Tools agent and attach HTTP Request Tool
Define URL placeholder for agent to input desired web address to visit
Enable "Optimise Response" option and select "HTML" from dropdown. Use default "body" as the content to extract.
Test agent
HTTP request tool fails to retrieve the contents of the URL.
Expected behavior
With "Optimise Response" option enabled for HTML, I'd expect the HTTP request tool to return the body of HTML of the given URL.
Bug Description
When enabling "Optimise Response" option for HTML in the HTTP request tool, the user recieves the following error as tool output. This prevents the AI agent from using the tool correctly.
Disabling the "Optimise Response" option allows the tool to function as expected.
With "Optimise Response" option
Without "Optimise Response" option
HTTP Request Tool Options
To Reproduce
Expected behavior
With "Optimise Response" option enabled for HTML, I'd expect the HTTP request tool to return the body of HTML of the given URL.
Operating System
MacOS Sonoma
n8n Version
1.64.0
Node.js Version
???
Database
SQLite (default)
Execution mode
main (default)