Connecting Google to n8n
A one-time setup that unlocks Google Sheets, Gmail, Drive, and every other Google node — do this once, and every Google node reuses the same connection.
Why this is a separate step
Before Google Sheets, Gmail, or any other Google service can talk to n8n, you need one thing: a Google OAuth credential. Unlike most n8n credentials, which are just a copy-pasted API key, Google’s is a proper OAuth connection — which means a short setup in Google’s own Cloud Console first, before n8n can use it. It looks more involved than it is; done once, it takes about five minutes and never needs repeating.
Step by step
1. Create a Google Cloud project. At console.cloud.google.com, create a new project (top-left project dropdown → New Project). Give it any name — “n8n Integration” is a sensible default.
2. Enable the Google Sheets API (and the Google Drive API, which Sheets, Docs, and Slides all rely on behind the scenes). In the Cloud Console, go to APIs & Services → Library, search for each, and click Enable.
3. Create an OAuth Client ID. APIs & Services → Credentials → Create Credentials → OAuth client ID. If prompted, configure the consent screen first — “External” audience, an app name, your email. It’s fine to leave this in Testing mode; there’s no need to publish it publicly. For the client type, choose “Web application,” and paste in the exact redirect URL n8n shows you when you start adding the credential.
4. Connect it in n8n. Copy the Client ID and Client Secret Google gives you. In n8n, start adding a Google credential, paste both in, and click “Connect my account” — this opens a Google sign-in popup where you approve access.
The mistake almost everyone makes first
A mismatched redirect URI. Google checks the redirect URL you registered against the one n8n is actually using, character for character — if they don’t match exactly, you’ll get a “redirect URI mismatch” error at the sign-in step. The fix is always the same: copy n8n’s redirect URL directly from the credential screen rather than typing it from memory, and paste it into the Cloud Console exactly as shown.
Keeping your Client Secret safe
Treat your Client ID and Client Secret like a password — they’re not meant to be shared or shown publicly. If you ever need to start over, Google Cloud lets you delete a project entirely (kept recoverable for about 30 days) and create a fresh one, which is often simpler than trying to track down and revoke a single leaked credential.
Once you’re connected
Head to the Google Sheets node or the Gmail node — both reuse the exact credential you just set up, no repeat setup needed.