Cannot do a n8n API request from n8n workflow

Hi. I’m trying to Retrieve my n8n workflow from another n8n workflow on the same instance. Using HTTP node. The request works in n8n Playground and Postman. But in the workflow I have next error:

{“status”:“rejected”,
“reason”:{“message”:“connect ETIMEDOUT my_instance_url”,
“name”:“Error”,
“stack”:“Error: connect ETIMEDOUT my_instance_url\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)”,
“code”:“ETIMEDOUT”}}

Can you help me solve this problem?

Hi @Nikolay_Titov,

I have test it with 0.193.5 on self hosted environment. No problems.

I think this is a firewall/DNS/network error. Depending on the configuration, n8n is addressed via an external URL. For the API requests you can also use localhost:5678 (depending on the configuration a different port). This should avoid problems in the network. If this still doesn’t work you have to take a closer look at your local firewall. Logically you have to pay attention to http/s in the URL.

I have n8n self-hosted version on the server, protocol https, ip:443

n8n version 0.193.3

Localhost works, thanks for your help, @BillAlex

1 Like