How to Connect Google Docs with n8n Locally (Step-by-Step Guide)

Automate Google Docs with n8n locally. Step-by-step guide to setup, fix access errors, and create docs easily with Google API.

Automation tools save time and reduce manual work. n8n is an open-source workflow tool that lets you connect different apps. One useful example is linking Google Docs with n8n to create and manage documents automatically.

What You Need

  • A Google account with Google Cloud Console access
  • n8n installed on your computer (default: http://localhost:5678)
  • Basic idea of how n8n workflows function

Step 1: Turn On Google Docs API and Drive API

  1. Go to Google Cloud Console.
  2. Create a new project or pick one you already have.
  3. Open APIs & Services → Library.
  4. Search for Google Docs API and click Enable.
  5. Do the same for Google Drive API.

Step 2: Make OAuth Credentials

  1. Go to APIs & Services → Credentials.
  2. Click Create Credentials → OAuth Client ID.
  3. Select Web Application.
  4. Name it something like: n8n Docs Integration.
  5. Add this redirect link under Authorized Redirect URIs:
    http://localhost:5678/rest/oauth2-credential/callback
  6. Save and copy the Client ID and Client Secret.
Tip: If Google blocks localhost, run n8n with a tunnel: n8n start --tunnel. Use the tunnel link Google gives you as redirect.

Step 3: Add Google Docs Login in n8n

  1. Open n8n at http://localhost:5678.
  2. Go to Credentials → New → Google Docs.
  3. Fill in your Client ID and Client Secret.
  4. Check the redirect link matches the one set in Google Console.
  5. Click Connect OAuth2 Account and log in with your Google account.

Step 4: Try a Sample Workflow

Create a small workflow to check the connection:

  1. Add a Google Docs node.
  2. Select action: Create Document.
  3. Give a name like n8n Test Document.
  4. Run it and check Google Drive for the new file.

Fixing Common Errors

Error: Access blocked – app not verified (403 access_denied)

This happens when your app is still in test mode. By default, only emails you add as test users can log in.

How to Solve

  1. Open Google Cloud Console → OAuth consent screen.
  2. Scroll to Test users and add your email.
  3. Save and try again in n8n.
Note: For personal or team use, adding test users is enough. Public apps need full Google verification.

Do You Need Verification?

  • Personal or small team use → Just add emails as test users.
  • Public use (any Google account) → Submit for Google review.

Free or Paid?

  • n8n: Free if you run it on your own machine. Paid only if you use n8n.cloud.
  • Google Docs API: Free with high daily limits. Normal workflows never cross these limits.

Wrap Up

By linking Google Docs with n8n locally, you can save hours of manual typing. With just a few steps — turn on APIs, create OAuth details, add credentials in n8n, and run a sample workflow — your automation is ready.

FAQs

Q: Is Google Docs API free?
A: Yes, it has a free quota large enough for most users.

Q: How to fix access_denied error?
A: Add your account email under Test users in the OAuth consent screen.

Q: Can I connect this on n8n cloud?
A: Yes, but use the cloud link as redirect instead of localhost.

Post a Comment

Please do not enter any spam link in the Comment box
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.