[Outbound Connection/DNS Error] n8n Space failing to reach external APIs (Facebook/Telegram)

Hi everyone,

I am running an automated workflow instance (n8n) using a Docker container inside a Hugging Face Space. The deployment itself works perfectly, but I am facing a persistent issue when the workflow tries to make outbound HTTP requests to specific external APIs, namely the Facebook Graph API (graph.facebook.com) and the Telegram API (api.telegram.org).

Whenever the workflow triggers these nodes, I receive the following error:

“Couldn’t connect with these settings. The connection cannot be established, this usually occurs due to an incorrect host (domain) value.”

What I suspect: This behavior strongly points to either a DNS resolution failure inside the Space container or a firewall/network policy blocking outbound traffic to these specific domains.

My questions to the community/staff:

  1. Are there known outbound network restrictions or blocked domains on Hugging Face Spaces (specifically for social media APIs)?

  2. If this is a DNS issue, is there a recommended way to force custom DNS settings (e.g., 8.8.8.8) within the Space’s configuration or Dockerfile?

Space URL: N8n - a Hugging Face Space by yking21

Has anyone experienced this while running n8n or similar automation tools on Spaces? Any insights or workarounds would be highly appreciated!

Thanks in advance.

The criteria aren’t clear, but it seems Hugging Face is intentionally restricting access to external APIs that could potentially be exploited for creating bots. I don’t know the reason, but there must be one.

There may be workarounds, but if they’re discovered, those workarounds will likely be blocked as well.

TeleBridge is a lightweight Vercel proxy that solves Telegram API access/banning issues by routing all Telegram traffic through a public Vercel endpoint.

Use this as the Telegram Credential Base URL in n8n:

https://tele-bridge-cyan.vercel.app

Do not add a trailing slash.

After updating the credential:

  1. Save the Telegram credential.

  2. Deactivate the workflow if it is already active.

  3. Activate the workflow again.

  4. n8n will automatically register the Telegram webhook through TeleBridge.

  5. All Telegram nodes should then work normally, including triggers, message actions, callback actions, chat actions, and file actions.