Automating tasks between Google services (like Gmail and Google Drive) and N8n can save you time and streamline your workflows. In this step-by-step guide, I’ll show you how to connect your Google Account with N8n in less than 5 minutes—completely for free!
Prerequisites
Before we begin, make sure you have:
✅ An N8n instance installed (if you don’t, check this guide to set it up for free on your own domain).
✅ A Google Cloud account (with billing enabled—required for API access).
Step 1: Set Up OAuth Credentials in Google Cloud Console
- Go to Google Cloud Console.
- Create a new project (e.g., “N8n-Gmail-Integration”) by clicking:
- “Select a Project” → “New Project” → Enter a name → “Create”.
- Enable the Gmail API:
- Navigate to “APIs & Services” → “Library”.
- Search for “Gmail API” → Click “Enable”.
- Configure OAuth Consent Screen:
- Go to “APIs & Services” → “OAuth Consent Screen”.
- Select “External” → Click “Create”.
- Fill in:
- App Name: (e.g., “N8n Gmail Connector”)
- User Support Email: (Your email)
- Developer Contact Email: (Your email)
- Click “Save and Continue”.
- Add Test Users:
- Under “Test Users”, add your Google account email → “Save”.
Step 2: Generate OAuth Client ID & Secret
- Go to “Credentials” → “Create Credentials” → “OAuth Client ID”.
- Select “Web Application” and enter:
- Name: (e.g., “N8n Gmail”)
- Authorized Redirect URIs:
- Copy the OAuth Redirect URL from N8n (shown when adding a new Google credential).
- Paste it here.
- Click “Create” → You’ll get a Client ID and Client Secret (save these!).
Step 3: Connect Google Account in N8n
- Open your N8n instance → Go to “Workflows” → Create a new workflow.
- Add a Gmail Node:
- Search for “Gmail” → Select “Send Email”.
- Set Up Google Credentials:
- Click “Create New Credential”.
- Enter:
- Client ID (from Google Cloud Console)
- Client Secret (from Google Cloud Console)
- Click “Save”.
- Authorize Access:
- Click “Sign in with Google” → Choose your account.
- Grant permissions (Select All → Continue).
Step 4: Test Your Gmail Integration
- In the Gmail node, fill in:
- To: (Your test email)
- Subject: “Test from N8n”
- Message: “This is an automated email!”
- Click “Execute Node” → Check your inbox for the test email!
Bonus: Connect Google Drive to N8n
- Enable Google Drive API in Google Cloud Console (same steps as Gmail API).
- In N8n, add a Google Drive Node (e.g., “Copy File”).
- Use the same OAuth credentials → Authorize access.
- Now you can automate file operations in Google Drive!
Conclusion
Now you can automate emails, manage Google Drive files, and more using N8n and Google’s APIs—all in under 5 minutes!
🔹 Need N8n installed? Check this free guide.
🔹 Questions? Drop them in the comments!
5/5 - (5 votes)