Connecting to Google on localhost

I am stuck on creating a Google Drive connection to my google account.

I’ve been following guide in this Youtube video: https://www.youtube.com/watch?v=gZ6N2H3_vys&ab_channel=n8n

I made sure the Google Drive API was enabled.
I made sure to include all scopes in for the app.
I tried in both Testing and Publish mode.
I am using the localhost:5678... redirect url provided by n8n.

Everytime I try to login I get a 404 error. What other steps am I possibly missing?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Have you set a custom value for N8N_PATH ?

I have not. What would I need to set N8N_PATH to? I am trying to set up connecting on my local machine.

The oauth callback window has a path prefix of /webooks. That’s very unlikely to be coming from n8n, unless N8N_PATH is set to /webooks.

1 Like

I don’t have a custom path set for N8N_PATH, but I do have WEBHOOK_URL=http://localhost:5678/webooks/ in my docker-compose.yaml. But the Redirect URL seems to work because it opens up the Gmail Oauth window. I get the 404 after I signing in and enable n8napp access.

Hey @jtoh,

Looking at your images you are accessing n8n with http://localhost:5678/ but you have WEBHOOK_URL set to http://localhost:5678/webooks/ which is where Google is trying to redirect you.

The problem here is /webooks isn’t an n8n url and you are not running n8n in that folder so it will always fail. I would set webhook_url to just http://localhost:5678 or remove that option as you are not using a domain anyway.

@netroy @Jon Thank you both, removing /webhooks was the correct fix. My follow up question is when would anyone want to update WEBHOOK_URL to something different? Would it be for when I move this to a registered domain?

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