Learn how to successfully connect your Gmail account to a locally hosted n8n instance using OAuth2. This step-by-step tutorial guides you through the entire Google Cloud Console setup, including enabling the Gmail API and configuring the correct Redirect URIs for localhost.
If you are running n8n on your own machine and struggling with Google authentication, this video is for you.
⏱️ Timestamps: 0:00 - Introduction & The Goal 0:07 - Creating a Google Cloud Project 0:30 - Enabling the Gmail API 0:42 - Configuring OAuth Consent Screen 1:08 - Creating OAuth Client ID & Secret 1:12 - Adding the Correct Redirect URI (Localhost) 1:23 - Connecting Credentials in n8n 1:40 - Final Authorization & Success
🚀 What's covered:
Creating a new project in Google Cloud Console
Enabling Gmail API services
Setting up OAuth Consent Screen for External usage
Generating Client ID and Client Secret
Fixing the "Redirect URI" for local n8n instances (http://localhost:5678...)
🔗 Useful Links:
n8n Documentation: https://docs.n8n.io/
Google Cloud Console: https://console.cloud.google.com/
Instagram, X, LinkedIn: @kgtechtalks
#n8n #automation #gmailapi #nocode #workflowautomation #selfhosted