AI Agent: Call n8n Workflow Tool - Invalid URL error

I want to call a sub workflow, source database, selected from list.

alway throws error “invalid URL”

i can call the sub workflow via “Execute Workflow” node flawlessly.

{
“errorMessage”: “Invalid URL”,
“errorDetails”: {
“rawErrorMessage”: [
“Invalid URL”
],
“httpCode”: “none”
},
“n8nDetails”: {
“nodeName”: “My Open Tasks”,
“nodeType”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“nodeVersion”: 1.2,
“itemIndex”: 0,
“runIndex”: 0,
“time”: “14.11.2024, 01:50:39”,
“n8nVersion”: “1.67.1 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Invalid URL”,
" at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:183:23)“,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:773:23)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:704:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1134:20"
]
}
}

Is this a bug? Or am I missing something?

Thank you.

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:

See

{
“errorMessage”: “Invalid URL”,
“errorDetails”: {
“rawErrorMessage”: [
“Invalid URL”
],
“httpCode”: “none”
},
“n8nDetails”: {
“nodeName”: “My Open Tasks”,
“nodeType”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“nodeVersion”: 1.2,
“itemIndex”: 0,
“runIndex”: 0,
“time”: “14.11.2024, 01:50:39”,
“n8nVersion”: “1.67.1 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Invalid URL”,
" at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:183:23)“,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:773:23)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:704:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1134:20"
]
}
}

Hey @AiSQUIRE,

That is very odd, Do you have a screenshot of the error? It doesn’t look the error is coming from the execute workflow node so could be an error coming back from the workflow you are calling.

In order to rule out personal mistakes I did copy Suggest meeting slots using AI | n8n workflow template

Same error occured with the “Workflow Tool” node.

So I guess it’s a system error.

1 Like

It looks like it, I will give it a test this morning and see if I can reproduce it.

1 Like

Hey Jon, did you get a chance to reproduce it?

Did you ever find a solution. I’m having the same issue accesing a Basic LLM Chain.

1 Like

Hey @AiSQUIRE,

Not yet, I have had a play with a simple workflow on 1.68 using the example below and it is working.

Can you test this workflow and try updating.

1 Like

I have the same issue with self host (docker)


This is the log from the docker compose

n8n-1       | Invalid URL
n8n-1       | TypeError: Invalid URL
n8n-1       |     at new URL (node:internal/url:806:29)
n8n-1       |     at dispatchHttpRequest (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:232:20)
n8n-1       |     at /usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:152:5
n8n-1       |     at new Promise (<anonymous>)
n8n-1       |     at wrapAsync (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:132:10)
n8n-1       |     at http (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:170:10)
n8n-1       |     at Axios.dispatchRequest (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/dispatchRequest.js:51:10)
n8n-1       |     at processTicksAndRejections (node:internal/process/task_queues:95:5)
n8n-1       |     at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/Axios.js:40:14)
n8n-1       |     at Object.httpRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:778:18)
n8n-1       |     at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/Axios.js:45:41)
n8n-1       |     at processTicksAndRejections (node:internal/process/task_queues:95:5)
n8n-1       |     at Object.httpRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:778:18)
n8n-1       |     at RoutingNode.rawRoutingRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:346:29)
n8n-1       |     at RoutingNode.makeRoutingRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:429:28)
n8n-1       |     at async Promise.allSettled (index 0)
n8n-1       |     at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:164:35)
n8n-1       |     at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:773:23)
n8n-1       |     at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:704:51
n8n-1       |     at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1134:20
2 Likes

I have the same issue in a self host docker config . been driving me crazy! hope it is a bug they fix :slight_smile:

I am running: 1.69.2 (Self Hosted)

My error:

Other info

Item Index

0

Run Index

0

Node type

@n8n/n8n-nodes-langchain.toolWorkflow

Node version

1.2 (Latest)

n8n version

1.69.2 (Self Hosted)

Time

03/12/2024, 22:03:12

Stack trace

NodeApiError: Invalid URL at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:183:23) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:773:23) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:706:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1137:20
1 Like

Same error here… Self hosted… I have two different tools, pointing to similar (same domain) endpoints. It seems the 2nd tool one doesn’t work… Both endpoints are serving other services and are 100% up and running.

{
  "errorMessage": "Invalid URL",
  "errorDetails": {
    "rawErrorMessage": [
      "Invalid URL"
    ],
    "httpCode": "none"
  },
  "n8nDetails": {
    "nodeName": "validateAddressTool",
    "nodeType": "@n8n/n8n-nodes-langchain.toolHttpRequest",
    "nodeVersion": 1.1,
    "itemIndex": 0,
    "runIndex": 0,
    "time": "12/23/2024, 1:19:50 PM",
    "n8nVersion": "1.71.3 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeApiError: Invalid URL",
      "    at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:193:23)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:792:23)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:724:51",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1155:20"
    ]
  }

Hi, it helped to put a extra node Edit Fields behind the Stringify Response Node. Just set the field to the output of the previous node. The error is gone with me. I don’t understand why, maybe makes sure this way the previous node is executed completely.

same error on n8n version 1.72.1 (Cloud)

1 Like

Same error! Docker on Digital Ocean! Any thoughts or workarounds?

1 Like

Exactly same error here of @AiSQUIRE. Same tutorial on a fresh install of docker ubuntu 24.04 just yesterday I installed it. I almost got crazy yesterday night trying to figure out what I was doing wrong.

Using 1.75.2 and tested also on 1.68 docker image suggested by @Jon but… same error.

Seems like a bug?

Just created a issue bug ticket there

Version: 1.75.2 running on docker locally.

Exact same error.

@Jon Any news on this?
Thanks

The same is happening here. Running version 1.77.3

Same problem. Happens when the http request tool is used as AI agent tool.

Getting same error when use code tool, perform a simple http request with javascript code

Created another workflow just with httprequest, works well if I trigger this workflow, but getting invalid error if I trigger it from AI gent

core

  • n8nVersion: 1.79.3
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.2
  • database: postgres
  • executionMode: regular
  • concurrency: -1