[ERROR: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta

I’m having this problem with the community version of n8n. When installing self-hosted, and n8n needs to go through a proxy, I get this error: It doesn’t connect to the Google Gemini API. How can I fix it?
[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent: fetch failed
Unknown error

Describe the problem/error/question

I’m having this problem with the community version of n8n. When installing self-hosted, and n8n needs to go through a proxy, I get this error: It doesn’t connect to the Google Gemini API. How can I fix it?

[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent: fetch failed
Unknown error

What is the error message (if any)?

I’m having this problem with the community version of n8n. When installing self-hosted, and n8n needs to go through a proxy, I get this error: It doesn’t connect to the Google Gemini API. How can I fix it?

[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent: fetch failed
Unknown error

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

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:

I also have this problem. I can’t use it when I connect to the gemin node. This error occurs when I have 5000 tokens. Normally this is impossible. I have been struggling with this for a week and still can’t solve it. . .I also have this problem. I can’t use it when I connect to the gemin node. This error occurs when I have 5000 tokens. Normally this is impossible. I have been struggling with this for a week and still can’t solve it. . .

1 Like

Lo corregí usando una política en el firewall directamente para estás direcciones de Google

1 Like

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