How to Connect Google Services to n8n (Step‑by‑Step Tutorial)
by Leon van Zyl
Leon van Zyl demonstrates a universal framework for connecting any Google service to n8n, covering OAuth consent screen setup, client credentials creation, API enabling, and credential configuration in both self‑hosted and cloud n8n instances. The video walks through Gmail, Drive, Calendar, Sheets, YouTube, and Gemini examples, showing how to trigger and perform actions in workflows.
How to Connect Google Services to n8n
Overview
Leon van Zyl shows a repeatable pattern that lets you connect any Google service to n8n in under a minute once you have the OAuth credentials. The tutorial covers:
- Creating a Google Cloud project
- Enabling the required APIs
- Configuring the OAuth consent screen
- Generating a client ID/secret
- Adding the credentials to n8n
- Using Gmail, Drive, Calendar, Sheets, YouTube, and Gemini nodes
Prerequisites
- A Google Cloud Platform account (https://cloud.google.com/)
- An n8n instance (self‑hosted or n8n.cloud)
- A domain for your n8n instance if self‑hosted (to set redirect URI)
- Optional: a test Google account for OAuth consent
Step‑by‑Step Instructions
1. Create a Google Cloud Project
- Go to Google Cloud Console and click Select a project → New Project.
- Name the project (e.g., n8n‑tutorial) and click Create.
- After creation, select the new project from the project picker.
2. Enable the APIs you need
- In the console, navigate to APIs & Services → Library.
- Search for each service you plan to use (e.g., Gmail API, Google Drive API, Google Calendar API, Google Sheets API, YouTube Data API, Gemini API).
- Click Enable for each.
3. Configure the OAuth Consent Screen
- In APIs & Services, click OAuth consent screen.
- Choose External as the user type and click Create.
- Fill in the required fields:
- App name (e.g., n8n‑tutorial)
- User support email
- Developer contact email
- Click Save and then Publish App to remove the “test mode” restriction.
4. Create OAuth Client Credentials
- Still in APIs & Services, go to Credentials.
- Click + CREATE CREDENTIALS → OAuth client ID.
- Application type: Web application.
- Name: n8n‑tutorial.
- Authorized redirect URI: copy the URL shown in your n8n credential dialog (e.g.,
https://your‑n8n‑url/oauth2/callback). - Click Create.
- Note the Client ID and Client Secret.
5. Add the Credentials to n8n
- Open your n8n instance and go to Credentials.
- Click New Credential → Google OAuth2 (generic).
- Paste the Client ID and Client Secret.
- Click Sign in with Google and authorize the requested scopes.
- Save the credential (give it a descriptive name, e.g., Google‑OAuth).
6. Test with a Gmail Trigger
- Create a new workflow.
- Add a Gmail node and set it to Trigger: New Email.
- Select the credential created earlier.
- Click Execute Node → Fetch Test Event to confirm the trigger works.
- Add a second Gmail node set to Send Message and link it to the first.
- Provide a recipient, subject, and body, then execute the workflow.
7. Repeat for Other Services
- Google Drive: Use the Google Drive node, enable Create File, Get File, etc.
- Google Calendar: Use the Google Calendar node, choose triggers like Event Created or actions like Create Event.
- Google Sheets: Use the Google Sheets node, e.g., Read Rows or Append Row.
- YouTube: Use the YouTube node for uploads or searches.
- Gemini: Use the Google Gemini AI node for generative tasks.
Tips & Gotchas
- Redirect URI: If you change your n8n domain or move to a different instance, update the redirect URI in the Google console.
- Test Mode: Until you publish the OAuth app, you’ll see a Google hasn’t verified this app warning. Publishing removes this.
- Scope Selection: The generic credential allows you to specify scopes. If you only need Gmail, add
https://mail.google.com/. - Multiple Environments: Create separate OAuth clients for dev and prod to isolate credentials.
- Self‑hosted vs Cloud: In n8n.cloud you don’t need to supply a client ID/secret; the platform manages it for you.
- Testing: Use the Fetch Test Event button on trigger nodes to quickly verify connectivity.
- Error Handling: If you get an invalid_grant error, check that the redirect URI matches exactly and that the app is published.
References
- Video transcript and timestamps: YouTube
- n8n docs on generic Google OAuth: n8n Docs
- Google Cloud OAuth guide: Google Docs





