Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Connect n8n to Google Drive

This guide shows you how to let n8n work with your Google Drive files, for example to upload, download or list them.

VPS and Cloud Servers2 min read20 steps

What is n8n?

n8n is a free tool, which you can run on your own server, that links apps together. You build a workflow, which is a chain of steps. Each step is a box called a node. Ask Hostvento support whether n8n is supported on your plan.

To use Google Drive, n8n needs permission. You give it with OAuth. OAuth is a safe way to say "this app may use my account" without handing over your password. It works like a hotel key card that opens only some doors.

Part 1: Make the Google key

  1. Open the Google Cloud Console in your browser and sign in with your Google account.
  2. Click the project menu at the top and choose New Project. Give it a name and click Create.
  3. Open APIs & Services, then Library.
  4. Search for Google Drive API and click Enable.
  5. Go to OAuth consent screen. Choose the user type, fill in the app name and your email, and save. If the app stays in testing mode, add your own Google address as a test user.
  6. Go to Credentials. Click Create Credentials, then OAuth client ID.
  7. Choose Web application as the type.
  1. In n8n, open Credentials and click Create Credential.
  2. Search for Google Drive OAuth2 API.
  3. Copy the OAuth Redirect URL shown on the screen.
  4. Back in Google, paste it into Authorized redirect URIs and click Create.
  5. Google shows a Client ID and a Client Secret. Copy both.

Part 3: Finish in n8n

  1. Paste the Client ID and Client Secret into the n8n credential.
  2. Click Sign in with Google.
  3. Choose your account and click Allow.
  4. Save the credential. n8n should say the connection is successful.

Test it

  1. Create a new workflow and add a Google Drive node.
  2. Choose your new credential.
  3. Pick a resource, such as File, and an action, such as Download or Upload.
  4. Click Execute step and check the result.
Tip: For OAuth to work, n8n must run on a secure https address. If you get a redirect error, check that the redirect link in Google matches the one in n8n exactly.

Menu names in Google Cloud can change over time. If a button looks different, look for the closest name.

Quick recap

  • Enable the Google Drive API in Google Cloud.
  • Create an OAuth client ID with the n8n redirect URL.
  • Paste the Client ID and Secret into n8n.
  • Click Sign in with Google and allow access.
  • Test with a Google Drive node.