Google oAuth error “should not be retried”

Describe the problem/error/question

So i am a little confused on getting a google cloud connection up and running with n8n:

I am using cloudfare tunnels so that i could potentially reach my private ip hosting n8n however the tunnel itself does not have an ip assigned to it.

My setup is all on docker compose and i have the tunnel token inputted down below

Do i have to create another a record for my public IP for this to work ?

services:
  n8n:
    image: n8nio/n8n
    restart: always
    container_name: n8n-server  # Custom container name
    ports:
      - "5678:5678"
    env_file:
      - ./.env
    volumes:
      - ./n8n-data:/home/node/.n8n
  cloudflare-tunnel:
    image: cloudflare/cloudflared:latest
    container_name: cloudflare-tunnel
    restart: unless-stopped
    command: tunnel --no-autoupdate run --token <my token>
volumes:
   n8n_data:
     driver: local 

What is the error message (if any)?

404 request 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

The server cannot process the request because it is malformed. It should not be retried

Information on your n8n setup

  • n8n version: LATEST

  • Database (default: SQLite): SQLite

  • n8n EXECUTIONS_PROCESS setting (default: own, main): own main

  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker

  • Operating system: Linux Debian

Hello @koms24, how are you?

Could you send a screenshot of the Google OAuth credential configuration and also the Google Cloud Console screen that shows the callback URL configuration?

Hello there,

If you are trying to figure out if the urls match, yes they do

What type of credential was used? (Drive, Sheets, Gmail)

It would be helpful to share information on how the setup was done.

Does this message appear after selecting the Google account, or when opening the popup?

Google calendar Api was used for this, ive enabled it in the google cloud project

The message appears after trying to click “sign in with google” in the

Any ideas @gabrielhmsantos

Hey, can you add this in your .env file:

environment:
      - WEBHOOK_URL=https://your-domain.com

Also, let’s check these in the Google Cloud Console:

  1. APIs & Services → Credentials:
    Authorized Redirect URIs must be exactly:
    https://n8n.your-domain.com/rest/oauth2-credential/callback

  2. Under OAuth Consent Screen
    Set Publishing Status to In production

You can also check this:
Cloudflare Dashboard → Zero Trust → Access → Tunnels:

  1. Subdomain: n8n (or whatever you want)
  2. Domain: your-domain.com
  3. Service: http://n8n:5678 (using container name)
  4. Path: Leave empty or /

Let us know if any of this helped.

I see, so in cloudflare tunnels i cannot put the private ip as the service url it must be my docker container name?

As Cloudflare and n8n both run in docker, they are in the same docker network, so you need to use the container name. If you were running Cloudflare outside docker, then you would use the IP.

Did you manage to get it to work?

1 Like

Ok so im not sure what i did but ill still mark this as a solution. Steps I took to get the error to go away:

  1. move to chrome (since i was using firefox) I do not believe this work however it segways into the next solution
  2. I really hope this wasnt it but i just clicked “Save” on the oauth credentials and it worked i can know choose my gmail account. If so thats embarrassing
  3. I also did change the tunnel url to my container name
1 Like

I’m actually interested in whether you should be embarrassed or not :smiley: (jk of course), can you change your tunnel url back and see if it breaks? Would be a good verification.

The URL can be either or for the tunnel as i just tested it. My portainer shows that the server IP is different for cloudflare and n8n not the actual host network so i guess that wasnt a problem

however im running into a new issue, this is after i select make “yourdomain. org wants to access your google account”

I added test users and put my gmail on it with some others. DO i need to hit “publish app” in google cloud for it to work??

Good news, should be one of these:

After setting up the Oauth consent screen (from the left side panel in the Google API Console), please check these steps:

  1. Make sure the n8n redirect URL is correctly set:

    Screenshot 2025-09-17 at 4.15.49 PM

  2. Make sure you copy-pasted the client secret and client ID into n8n without spaces or typos

  3. While at it, also make sure you enabled the respective Google app API:
    Google Cloud Library

One more thing: Under OAuth consent screen, set your app to In Production to avoid credentials expiring. That shouldn’t be the fix but still recommended.

For this error, simply create a new secret key from the google cloud and retry connection👍

1 Like

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