To connect Google services (such as Google Sheets, Drive, Gmail, and others) to n8n, you need to create and configure an OAuth 2.0 Client ID in Google Cloud Console, then use those credentials in n8n.
Previously on our website, we explained how to install n8n Community Edition on a VPS — if you don’t yet have a working n8n instance, start with that guide.
1. Create an OAuth 2.0 Client ID in Google Cloud Console
- Go to Google Cloud Console.
- In the menu, navigate to: APIs & Services → Credentials.
- Click Create credentials → OAuth client ID.
- In the Application type field, select Web application.
- Enter a name, for example: n8n Google OAuth.
- In the Authorized redirect URIs section, add the URL that n8n provides when you create a Google OAuth credential.
- Save and make a note of your Client ID and Client Secret.
2. Enable the Required APIs
- In Google Cloud Console, open APIs & Services → Library.
- Find and enable the necessary APIs:
- Google Sheets API
- Google Drive API
- Gmail API
3. Configure the Credentials in n8n
- Open your n8n instance and go to Credentials.
- Click Add credential.
- Select Google OAuth2.
- Paste your Client ID and Client Secret.
- Log into your Google account and grant access.
4. Alternative Method: Service Account
If you don’t need a user to sign in to a Google account, you can use a Service Account for server-side scenarios:
- In Google Cloud Console, create a Service Account.
- Download the JSON key.
- In n8n, when creating credentials, choose Google Service Account and upload the JSON file.







Comments