CRITICAL: Cloud Instance Cannot Make HTTPS Requests from Code or HTTP Request Node

Hello,

My n8n.cloud instance is in a critical state and seems unable to perform custom HTTP POST requests.

1. HTTP Request Node Failures: The HTTP Request node consistently fails when trying to POST to the Google Gemini API (generativelanguage.googleapis.com) with a 400 Bad Request - content is not specified error. We have tried all possible configurations (JSON Body Object, Raw Body with JSON.stringify, different authentication methods).

2. Code Node Failures: As a workaround, we tried using the Code node. However, the Code node cannot use core, built-in Node.js modules. The first line const https = require('https'); fails with the error Cannot find module 'https'. This is a fundamental module and should always be available.

This proves my execution environment is severely restricted or corrupted.

My instance has basic internet access (a simple GET request to jsonplaceholder from the HTTP Request node works), but any complex POST request or code-based request is failing. This is happening even in an Incognito browser window.

Please investigate my instance urgently.

My instance URL is: [n8n.io - Workflow Automation]

Thank you.

Hi there, the code node can only be used for data handling and transformation, it cant be used to make http request

and for the HTTP Request node failures, you mention tht a simple get request to jsonplaceholder works, but not on the Google Gemini API, not to mention tht the error is 400, meaning tht theres somthn wrong with how you setup the API Call

maybe if you can sharre your workflow tht would be nice, but most likely is because something is missing tht is required to call the gemini APi but u have not yet put it

Hi @fahmiiireza

It can be used for http requests, but I do strongly recommend not to use it for that. :slight_smile:

1 Like

aah yea, just saw the older discussion about it, but yeah, seems is a bit headache just to do so, so better not

thanks for the corrections tho @BramKn , appreciate it!

1 Like