Connect Gmail, Sheets, Drive and Calendar to n8n
Set up Google sign-in once and use it for every Google app in your flows.
8 min read
On n8n Cloud
Just open the Google node, create a new credential and click Sign in with Google. Done.
On self-hosted n8n: create your own Google app
- Go to console.cloud.google.com and create a new project (e.g. "n8n").
- Open APIs & Services → Library and enable the APIs you need: Gmail API, Google Sheets API, Google Drive API, Google Calendar API.
- Open OAuth consent screen: choose External, fill in the app name and your email, and add yourself as a test user.
- Open Credentials → Create credentials → OAuth client ID → Web application.
- In n8n, create a Google credential and copy its OAuth Redirect URL. Paste it into Authorized redirect URIs in Google.
- Copy the Client ID and Client Secret from Google into n8n, then click Sign in with Google.
Common problems
- "Access blocked": add your Google account as a test user on the consent screen.
- Sign-in stops working after about a week: apps in Testing mode get short-lived sign-ins. Reconnect, or publish the app in the consent screen settings.
- "redirect_uri_mismatch": the redirect URL in Google must match n8n's exactly, including https.
Finding IDs
- Spreadsheet ID: the long code in the sheet URL between /d/ and /edit.
- Drive folder ID: the code at the end of the folder URL.
- Calendar: use primary for your main calendar.