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

Connect n8n to Google Sheets

This guide shows you how to let n8n read and write rows in your Google Sheets, so your spreadsheet can fill itself.

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.

n8n needs your permission to use Google Sheets. You give it with OAuth. OAuth is a safe way to allow an app into your account without sharing your password, like a visitor pass.

Part 1: Set up Google

  1. Open the Google Cloud Console and sign in with your Google account.
  2. Create a new project with New Project, or pick one you already have.
  3. Open APIs & Services, then Library.
  4. Search for Google Sheets API and click Enable.
  5. Search for Google Drive API and enable it too. n8n uses it to list your spreadsheets.
  6. Open the OAuth consent screen page, fill in the app name and your email, and save. In testing mode, add your own address as a test user.
  7. Open Credentials, click Create Credentials and choose OAuth client ID. Pick Web application.

Part 2: Set up n8n

  1. In n8n, open Credentials and click Create Credential.
  2. Search for Google Sheets OAuth2 API.
  3. Copy the OAuth Redirect URL shown there.
  4. In Google, paste that link under Authorized redirect URIs and click Create.
  5. Copy the Client ID and Client Secret from Google into n8n.
  6. Click Sign in with Google, choose your account and click Allow.
  7. Save the credential.

Test with a workflow

  1. Create a new workflow and add a Google Sheets node.
  2. Choose the credential you just made.
  3. Pick an action, for example Append Row to add data, or Get Row(s) to read data.
  4. Select your spreadsheet from the list, and then pick the sheet tab.
  5. Match the columns with the data you want to send.
  6. Click Execute step, then open the sheet to see the result.

Warning: actions such as Delete or Clear remove data. Use a copy of your sheet while you test.

Tip: Put clear names in the first row of the sheet. n8n uses them as column names, which makes matching data much easier.

Google changes its menus now and then. If a name looks different, search for the nearest one.

Quick recap

  • Enable the Google Sheets and Drive APIs.
  • Create an OAuth client with the n8n redirect URL.
  • Paste the Client ID and Secret into n8n and sign in.
  • Add a Google Sheets node and test it.
  • Use a copy of your sheet for tests.