Skip to main content
In this guide you’ll set up Google Cloud Console so n8n can authenticate with Google services (Drive, Gmail, Sheets, Docs, etc.) using a single OAuth credential you can reuse across Google nodes. The OAuth flow is the same for all Google-based nodes, so we’ll use the Google Drive node as the example. Open your Google Drive node in n8n and create a new credential to begin.
The image shows a Google Drive Trigger configuration screen in an application interface, with options for setting poll times and selecting folders. The right side of the image is an output section with placeholder text.
Overview — what you’ll do:
  • Create or select a Google Cloud project.
  • Configure the OAuth consent screen.
  • Create an OAuth 2.0 Client ID (web application).
  • Add n8n’s OAuth redirect URL to the client.
  • Copy Client ID and Client Secret into n8n.
  • Enable required Google APIs (Drive, Sheets, Gmail, Docs).
  • Authenticate from n8n and test the integration.
Step-by-step instructions
  1. Open Google Cloud Console
  • Go to https://console.cloud.google.com and sign in with the Google account you want to use for API access.
  1. Create or select a project
  • Click the project drop-down (top-left) and choose New Project.
  • Give the project a name (for example n8n-demo-kk) and set Location to “No organization” if applicable. Click Create, then Select.
The image shows a Google Cloud interface where a project named "n8n-test" is selected, and a notification indicates that the client ID has been copied to the clipboard.
  1. Configure the OAuth consent screen
  • In the left menu go to APIs & Services > OAuth consent screen.
  • Click Get started if prompted.
  • Enter an App name (you can reuse your project name) and choose a Support email.
  • For User Type choose External unless you have a Google Workspace domain and want Internal.
  • Save and continue through the required fields.
The image shows a Google Cloud dashboard offering $300 in free credits for new users, along with notifications related to project creation.
  1. Create the OAuth 2.0 Client ID
  • Go to APIs & Services > Credentials and click Create Credentials > OAuth client ID.
  • Select Application type: Web application.
  • Give the OAuth client a Name (for example n8n-demo-kk).
The image shows a Google Cloud interface for creating an OAuth client ID, with fields for application type, name, and authorized JavaScript and redirect URIs. A notification indicates that the OAuth configuration has been created.
  1. Add an Authorized redirect URI
  • In n8n, when creating the Google credential, copy the OAuth Redirect URL shown in the credential form.
  • Paste that exact redirect URL into Authorized redirect URIs in the Google Cloud dialog, then click Create.
  1. Copy the Client ID and Client Secret
  • After creating the OAuth client, copy the Client ID and Client Secret from the Google Cloud dialog.
  • Paste them into the corresponding fields in the n8n Google credential.
The image shows a Google Cloud interface where an OAuth client ID has been successfully created, along with options to download the associated JSON file.
Before finishing the OAuth flow in n8n, complete these two important items in the Google Cloud Console:
  • Branding and Authorized domains:
    • In the OAuth consent screen > Branding section, add any Authorized domains you will use.
    • For n8n Cloud users add n8n.cloud. For self-hosted n8n add your host domain (for example example.com).
    • The authorized domain must match the domain portion of the redirect URI you provided.
  • Enable the APIs you will use:
    • Search for and enable the Google APIs your workflows require (for example: Google Drive API, Gmail API, Google Sheets API, Google Docs API).
The image shows a configuration screen for connecting a Google Drive account using OAuth2 API, including fields for OAuth Redirect URL, Client ID, and Client Secret. There is also a "Sign in with Google" button visible.
  1. Set testing/publishing state
  • In the OAuth consent screen, set the Publish status to Testing for development. For production you can submit the app for verification and publish it.
  • Note: an unverified app will display a Google warning during sign-in; this is expected for development accounts.
If you see a “Google hasn’t verified this app” warning when signing in, that is expected for unverified apps. For development and testing you can proceed. To remove the warning for production, submit the app for verification through Google Cloud.
Optional — troubleshooting tip:
  • If you receive redirect mismatch errors during sign-in, double-check the Authorized redirect URIs and Authorized domains in the OAuth consent screen. They must match the exact domain and path used in the n8n credential.
Ensure the redirect URI you add to Google Cloud exactly matches the OAuth Redirect URL shown in n8n (including protocol, domain, and path). A mismatch will cause Google sign-in to fail.
  1. Authenticate from n8n
  • Back in n8n’s Google credential dialog, click Sign in with Google.
  • Choose the account and accept the requested permissions (scopes).
  • Once authorized, n8n will display the account as connected.
  1. Test the Google Drive trigger
  • Configure the Google Drive Trigger node and choose the folder to watch.
  • Click Fetch Test Event. If there’s no recent activity you may see “no data with the current filter.”
  • Upload a file (for example an .xlsx) to the selected Drive folder, then click Fetch Test Event again. The node should receive the new file metadata and trigger.
The image shows a software interface for configuring a Google Drive Trigger, which includes parameters like poll times and folder selection. It also displays a button labeled "Fetch Test Event" and an area for executing or setting mock data.
Repeat for other Google services
  • After you enable an API in Google Cloud (Sheets, Gmail, Docs, etc.), you can use the same OAuth credential in n8n to connect those nodes. The OAuth client, redirect URI, and authorized domains remain the same — only enable the additional APIs you need.
Quick reference — common Google APIs to enable
APIUse caseDocs
Google Drive APIFile metadata, upload/download, watch foldershttps://developers.google.com/drive/api
Google Sheets APIRead/write Sheets data, append rowshttps://developers.google.com/sheets/api
Gmail APISend and read emailshttps://developers.google.com/gmail/api
Google Docs APIRead and update Google Docs contenthttps://developers.google.com/docs/api
Links and references That’s it — once the OAuth client and APIs are configured, you can connect Drive and any other Google services in n8n using the same OAuth credential and reuse it across nodes and workflows.

Watch Video