N8N is a powerful workflow automation tool that connects your apps and services. Google Drive is where most teams store their documents, spreadsheets, and files. Connecting these two creates possibilities for automated document processing, data synchronization, and workflow triggers based on file changes.
The problem is that OAuth authentication setup trips up many users. The redirect_uri_mismatch error appears, scope configuration confuses people, and it is easy to spend an hour trying to figure out why your credentials are not working.
This guide walks through the complete setup process, explaining not just what to do but why each step matters.
Key Takeaways
- You need a Google Cloud project with the Drive API enabled before N8N can authenticate
- The redirect_uri_mismatch error occurs when the URI in Google Cloud does not match what N8N provides
- OAuth scopes determine what permissions your integration receives
- Once connected, N8N can trigger workflows on file changes and perform file operations
- The connection setup takes about 15-20 minutes if you follow these steps carefully
Why N8N and Google Drive Together
Before the technical setup, understanding why this integration matters helps motivate the configuration effort.
Automations you can build with this connection include:
File Processing Pipelines: When a new file lands in a specific Google Drive folder, N8N automatically extracts data, updates spreadsheets, sends notifications, or converts the file to another format.
Document Creation Workflows: Templates in Google Drive become the basis for automated document generation. Fill in data from other sources and have N8N create properly formatted documents.
Backup and Sync: Cross-reference files between Google Drive and other storage systems. When changes occur in one, N8N can replicate them to the other.
Approval Workflows: Monitor a Drive folder for new proposals or documents. Route them to approvers via email or Slack, then move files to approved or rejected folders based on responses.
Data Extraction: New spreadsheets trigger workflows that extract specific data and route it to CRMs, databases, or analytics platforms.
The combination of N8N’s workflow capabilities with Google Drive’s storage creates automation opportunities that would otherwise require significant custom development.
Step 1: Create a Google Cloud Project
Google Cloud is where you register applications that use Google’s APIs. Even if you only use Google Drive personally, the integration requires this registration.
Create the Project
- Go to console.cloud.google.com
- If you have existing projects, click the project selector at the top
- Click “New Project”
- Name your project something descriptive: “N8N Integration” works fine
- Choose your billing account (required, but Google Drive API is free for reasonable usage)
- Click “Create”
Wait a moment for the project to initialize. You will see it appear in the project selector once ready.
Enable the Drive API
- With your new project selected, go to the hamburger menu (three lines) on the left
- Hover over “APIs and Services” and click “Library”
- In the search bar, type “Google Drive API”
- Click the “Google Drive API” result
- Click “Enable”
- You may need to agree to terms of service
The Google Drive API is what allows external applications to access your Drive files. Without enabling it, no amount of credential configuration in N8N will work.
Step 2: Configure OAuth Consent Screen
OAuth requires users to approve what applications can access. The consent screen configuration determines what users see when they authorize your integration.
Start Consent Configuration
- Go to “APIs and Services” > “OAuth consent screen”
- You will see two options: “External” and “Internal”
- Choose “External” if you want to use this with any Google account
- Choose “Internal” if everyone who will use this is in your Google Workspace organization
For personal use or integrations shared across organizations, “External” is correct.
Fill In Basic Info
The consent screen requires:
App name: Something users will recognize. “N8N Google Drive Integration” or your workflow name.
User support email: An email where users can reach someone about the integration.
Developer contact information: Google’s requirement. Use your own email.
Click “Save and Continue.” You can skip optional fields.
Add Scopes
Scopes determine what your integration can do. For Google Drive, you need scopes that specify read and/or write access.
Click “Add Scopes” and select:
https://www.googleapis.com/auth/drive- Full access to Drive (only necessary if you need complete capabilities)https://www.googleapis.com/auth/drive.file- Access to files created by this apphttps://www.googleapis.com/auth/drive.readonly- Read access only (if you do not need to modify files)https://www.googleapis.com/auth/spreadsheets(if accessing Google Sheets)
For most N8N workflows, https://www.googleapis.com/auth/drive provides the most flexibility even if you only need partial capabilities. The scope gives N8N access; the specific operations N8N performs depend on your workflow design.
Click “Save and Continue.”
Add Test Users (Important)
Before launching publicly, you must add test users if your consent type is “External.” Without test users, you cannot authorize access even for yourself during development.
- Scroll to the “Test users” section
- Click “Add Users”
- Add your own Google email address
- You can add up to 100 test users
If you skip this step and your app is not published, you will get an “access denied” error when trying to authorize.
Step 3: Create OAuth Credentials
Now you need the client ID and client secret that N8N will use to authenticate.
Create Credentials
- Go to “APIs and Services” > “Credentials”
- Click “Create Credentials” at the top
- Choose “OAuth client ID”
- Application type: “Web application”
- Name: Something recognizable, like “N8N Google Drive”
Configure Redirect URI
This is where most people encounter the redirect_uri_mismatch error. N8N provides a specific redirect URI that must be entered exactly.
The standard N8N redirect URI is:
http://localhost:5678/rest/oauth2-credential/callback
Enter this URI in the “Authorized redirect URIs” field.
Click “Create.”
Google will display your Client ID and Client Secret. Copy both immediately and save them somewhere secure. The client secret will not be shown again after you leave this page.
Step 4: Configure N8N
Now configure N8N to use these credentials.
Add Google Drive Credential
- Open N8N (typically at http://localhost:5678 if running locally)
- Click “Credentials” in the left sidebar
- Click “Add” to create new credentials
- Search for or select “Google Drive OAuth2 API”
- Name your credentials something descriptive
Enter Credentials
In the credential configuration:
Client ID: Paste the Client ID from Google Cloud
Client Secret: Paste the Client Secret from Google Cloud
Authorization URL: Leave as default (N8N pre-fills this)
Access Token URL: Leave as default
Scope: Enter the scope you configured in Google Cloud, typically https://www.googleapis.com/auth/drive
Complete OAuth Flow
N8N will initiate the OAuth flow:
- Click “Sign in with Google” in the credential configuration
- A popup will open to Google’s consent screen
- If you set up test users correctly, you can authorize with your Google account
- If you see “This app is not verified” or access denied, you need to add test users in Google Cloud
After authorization, N8N will indicate the credentials are valid.
Troubleshooting Common Errors
redirect_uri_mismatch
This error means the redirect URI in Google Cloud does not match what N8N is sending. Verify:
- The URI in Google Cloud exactly matches
http://localhost:5678/rest/oauth2-credential/callback - No trailing spaces or slashes
- If using N8N.cloud instead of self-hosted, the redirect URI is different. Check N8N.cloud documentation for the correct URI.
Access Denied / App Not Verified
For unverified apps, Google shows warnings or blocks access. During development, this is expected. Fix it by:
- Going to Google Cloud Console
- Clicking “Publish” on the OAuth consent screen
- Or adding your email as a test user
Test users bypass the verification requirement for internal testing.
Invalid Credentials
If N8N reports invalid credentials immediately after entering them:
- Verify you copied the Client ID and Client Secret correctly
- Ensure you enabled the Google Drive API
- Check that the OAuth consent screen is properly configured
Using the Google Drive Connection
With credentials configured, you can now use Google Drive nodes in N8N workflows.
Trigger: Google Drive Watch Files
This trigger starts a workflow when files change in Drive:
- Add a “Google Drive Trigger” node
- Select your credentials
- Choose the folder to monitor
- Configure what events to watch: file created, modified, or deleted
The node outputs data about the changed file, which subsequent nodes can process.
Action: Google Drive Search
Search for files matching criteria:
- Add a “Google Drive” node
- Choose “Search for Files” operation
- Configure search parameters: folder, file name patterns, file types
- The node returns matching file metadata
Action: Download File
Get file contents:
- Add a “Google Drive” node
- Choose “Download File” operation
- Provide the file ID from previous node output
- Use the binary data in subsequent nodes
Action: Upload File
Create or update files:
- Add a “Google Drive” node
- Choose “Upload File” operation
- Configure: folder ID, file name, content
- Returns the new file ID for further processing
Example Workflow: New Form Response to Document
A common pattern: Google Forms submissions trigger document creation.
Trigger: Google Forms “New Response” trigger
Node: Extract response data
Node: Google Drive “Upload File”
- Folder: Create a “Responses” folder ID
- File name:
Response - {{$json.timestamp}}.docx - Content: Format response data into a document
Node: Google Sheets “Update Row” (optional)
- Add response metadata to a tracking spreadsheet
This workflow runs automatically whenever someone submits your form, organizing responses into individual documents without manual processing.
Security Considerations
OAuth access to Google Drive means N8N can read and modify any files your credentials can access. Protect this capability:
Least Privilege Scopes: Use the minimum scope necessary. If you only need to read spreadsheets, use spreadsheet scopes only.
Separate Credentials: Create separate OAuth credentials for different workflows or use cases. If one credential is compromised, damage is limited.
Folder Permissions: Store integration files in folders with limited access. Do not share integration credentials with files that need broad access.
Credential Rotation: Periodically regenerate credentials and update N8N. This limits the window of exposure if credentials are compromised.
Conclusion
Connecting Google Drive to N8N takes about 20 minutes the first time. The OAuth setup is the main hurdle, and understanding why each step exists helps you troubleshoot when things go wrong.
The integration unlocks significant automation potential. File changes trigger workflows, documents process automatically, and data synchronizes between systems without manual intervention.
Once you have this connection working, you will find越来越多的 automation opportunities that use Google Drive as a trigger or action. The combination of N8N’s flexibility with Google Drive’s storage creates workflows limited only by your imagination.
Your next step: pick one manual file process you do regularly and automate it with this connection. Start simple, verify it works, then expand to more complex workflows.