How to Connect n8n to Google APIs Without Connections Dropping
Tired of n8n Google nodes disconnecting? Learn how to use Google Service Accounts to build stable, professional integrations that never expire.
Vitaliy · ilovefiniki.com
How to Connect n8n to Google APIs Without Connections Dropping
We've all been there: you build a beautiful n8n workflow connecting Google Sheets or Google Calendar, test it, and celebrate as it runs perfectly. Then, exactly seven days later, the workflow fails. You check n8n, and there it is: a connection error. You have to manually re-authenticate through your browser.
If you are running integrations for your own business, this is a weekly annoyance. But if you built this automation for a client, it is a disaster. It makes your work look unstable, hurts your reputation, and lands you with unpaid support hours just to log in and reconnect their account.
Fortunately, there is a simple solution to make Google nodes in n8n stable once and for all: Google Service Accounts.
The Problem: Why OAuth Drops Every 7 Days
When you connect Google nodes in n8n using the standard browser login (OAuth), n8n uses a Google Cloud project to handle the authorization. By default, new Google Cloud projects are set to "Testing" mode.
Under Google's security guidelines, any refresh token issued for a project in "Testing" status expires after exactly 7 days. Once that token expires, n8n loses access, and the workflow breaks.
You could publish the project to "Production" mode, but this presents a different problem. When your client tries to authenticate, they will be greeted by a large, alarming warning screen: "Google hasn't verified this app." To bypass this, they must click through advanced warnings, which looks highly unprofessional. To remove the warning, you would have to submit the app for official Google verification—a slow, bureaucratic process involving privacy policies and video demonstrations.
The Solution: Google Service Accounts
A Google Service Account is a special "bot" account that belongs to your Google Cloud project rather than a specific user. It does not use browser logins, it does not require passwords, and its credentials never expire.
Instead of authenticating with a personal Google account, you create a Service Account, generate a JSON key, and add those credentials directly to n8n.
How to Set It Up in 4 Steps
1. Create the Service Account
Navigate to the Google Cloud Console, select your project, and go to IAM & Admin > Service Accounts. Click Create Service Account, give it a name (e.g., n8n-sheets-sync), and click create.
2. Generate the JSON Key
Once the account is created, click on its email address, go to the Keys tab, click Add Key > Create new key, and choose JSON. This downloads a credentials file to your computer.
3. Enable the APIs
In the Google Cloud Console search bar, search for Google Sheets API and Google Drive API (or any other Google APIs your workflow needs, like Calendar) and click Enable for each.
4. Connect to n8n and Share Files
In n8n, add a new credential of type Google Service Account and copy the details from the downloaded JSON file. Finally, copy the Service Account's email address (e.g., [email protected]) and share your target Google Sheets or Drive folders with this email, granting it Editor permissions.
Why This is Better for Client Work
Using Google Service Accounts completely transforms the way you deliver automations:
- Zero Maintenance: The connection never expires, eliminating weekly support tickets.
- Professional Delivery: The client doesn't need to share their personal Google password or join a screenshare call to log in.
- Granular Security: Instead of granting n8n access to their entire Google Drive or Inbox via OAuth, the client simply shares specific files or folders with the service account's email.
By investing five minutes of extra setup upfront, you save hours of future maintenance and deliver a robust, enterprise-grade integration.
If you want to build reliable automations for your business, we can help. Check out our automation services or get in touch for a free workflow audit.
Ready to Cut 20+ Hours of Manual Work Per Week?
Book a free 45-minute workflow audit with ilovefiniki.com. Walk away with a clear automation roadmap — no commitment required.