Library/n8n/How to Connect Google Services to n8n (Step‑by‑Step Tutorial)
n8n

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

  1. A Google Cloud Platform account (https://cloud.google.com/)
  2. An n8n instance (self‑hosted or n8n.cloud)
  3. A domain for your n8n instance if self‑hosted (to set redirect URI)
  4. Optional: a test Google account for OAuth consent

Step‑by‑Step Instructions

1. Create a Google Cloud Project

  1. Go to Google Cloud Console and click Select a projectNew Project.
  2. Name the project (e.g., n8n‑tutorial) and click Create.
  3. After creation, select the new project from the project picker.

2. Enable the APIs you need

  1. In the console, navigate to APIs & ServicesLibrary.
  2. 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).
  3. Click Enable for each.

3. Configure the OAuth Consent Screen

  1. In APIs & Services, click OAuth consent screen.
  2. Choose External as the user type and click Create.
  3. Fill in the required fields:
    • App name (e.g., n8n‑tutorial)
    • User support email
    • Developer contact email
  4. Click Save and then Publish App to remove the “test mode” restriction.

4. Create OAuth Client Credentials

  1. Still in APIs & Services, go to Credentials.
  2. Click + CREATE CREDENTIALSOAuth client ID.
  3. Application type: Web application.
  4. Name: n8n‑tutorial.
  5. Authorized redirect URI: copy the URL shown in your n8n credential dialog (e.g., https://your‑n8n‑url/oauth2/callback).
  6. Click Create.
  7. Note the Client ID and Client Secret.

5. Add the Credentials to n8n

  1. Open your n8n instance and go to Credentials.
  2. Click New CredentialGoogle OAuth2 (generic).
  3. Paste the Client ID and Client Secret.
  4. Click Sign in with Google and authorize the requested scopes.
  5. Save the credential (give it a descriptive name, e.g., Google‑OAuth).

6. Test with a Gmail Trigger

  1. Create a new workflow.
  2. Add a Gmail node and set it to Trigger: New Email.
  3. Select the credential created earlier.
  4. Click Execute NodeFetch Test Event to confirm the trigger works.
  5. Add a second Gmail node set to Send Message and link it to the first.
  6. 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

This guide was generated by an AI agent based on the video above. Always verify steps against the original source.Watch on YouTube ↗

More n8n guides

See all n8n guides →
Telegram Expense Tracker using n8n + Google Sheets (Step-by-Step)
n8n

Telegram Expense Tracker using n8n + Google Sheets (Step-by-Step)

Tech Area

Telegram Expense Tracker using n8n + Google Sheets (Step-by-Step) from Tech Area. Learn how to build a simple and powerful expense tracker using Telegram, Google Sheets, and n8n in this beginner-friendly ...

N8N daily expenses with telegram and supabase #ai #kopianan #n8n #supabase #telegram #bot
n8n

N8N daily expenses with telegram and supabase #ai #kopianan #n8n #supabase #telegram #bot

kopianan

N8N daily expenses with telegram and supabase #ai #kopianan #n8n #supabase #telegram #bot from kopianan. A practical n8n tutorial indexed from YouTube.

This AI Agent can help you with money management #ai #n8n #workflow #aiagents
n8n

This AI Agent can help you with money management #ai #n8n #workflow #aiagents

Bernard | AI Automation

This AI Agent can help you with money management #ai #n8n #workflow #aiagents from Bernard | AI Automation. A practical n8n tutorial indexed from YouTube.

Zapier vs n8n: The Truth No One Tells You
n8n

Zapier vs n8n: The Truth No One Tells You

Kevin Stratvert

Zapier vs n8n: The Truth No One Tells You from Kevin Stratvert. n8n is getting a lot of attention, but does it really beat Zapier? In this short breakdown, I compare both tools side-by-side — setup, ...

How We Automate Receipt Tracking with n8n
n8n

How We Automate Receipt Tracking with n8n

Linkeli LTD

How We Automate Receipt Tracking with n8n from Linkeli LTD. We built a zero-touch receipt tracker using n8n, OCR, and AI. Here's how it works—step by step, with real-world tools.

Automação Financeira com n8n e Gemini: Passo a Passo
n8n

Automação Financeira com n8n e Gemini: Passo a Passo

Programação Dinâmica

Automação Financeira com n8n e Gemini: Passo a Passo from Programação Dinâmica. Automatizei meu registro de gastos com n8n, mensagens de voz no Telegram viram entradas no Notion. Veja como essa ...

Browse other AI tools