Google Sheets Cells not updating

Description of the Issue

Hello n8n Community,

I am experiencing an issue where my Google Sheets Append Node is not successfully updating my spreadsheet. I have configured the node to append new data rows to an existing Google Sheet, but no changes are being made despite successful workflow execution.


My Setup

  • Operating System: Ubuntu 20.04 LTS
  • n8n Version: 0.219.1
  • Google Sheets Node Version: Latest (as of March 29, 2025)
  • Authentication Method: OAuth2 (Google Sign-In)
  • Spreadsheet Permission Level: Full Editing Access

Workflow Configuration

  1. Code Node (Generating Data)
  • Outputs a JSON object with a data key containing an array of arrays (rows of data).
  • Example output:

json

CopyEdit

{
  "data": [
    [
      "ERIC DAVID",
      "435 Sunset Blvd, Malibu, CA",
      "7/15/25",
      "15th July 2025",
      "birthday party",
      "50",
      "$75",
      "5:30 PM",
      "(310) 555-7823",
      "[email protected]",
      "Mediterranean-inspired",
      "buffet",
      "vegetarian, nuts",
      "bartending",
      "ERIC DAVID - Event Proposal (15th July 2025)"
    ]
  ]
}
  1. Google Sheets Append Node Configuration
  • Action: Append
  • Spreadsheet ID: Provided from a previous Google Drive Copy Node ({{ $('Google Drive Copy Node').item.json['spreadsheetId'] }})
  • Sheet Name: Sheet1
  • Range: (Left Blank)
  • Value Input Mode: USER_ENTERED
  • Data Property Name: data

Troubleshooting Steps Attempted

  1. Verified OAuth2 Authentication:
  • Successfully authenticated via Google Sign-In with full permissions to edit Sheets.
  1. Checked Spreadsheet ID & Sheet Name:
  • Confirmed the Spreadsheet ID is correctly passed to the Google Sheets Append Node.
  • Confirmed the Sheet Name (Sheet1) is accurately specified.
  1. Verified Data Property Name:
  • The data key is correctly being generated by my Code Node.
  • Output format is a valid array of arrays.
  1. Tested with Sample Data:
  • Attempted to append simple static data, but no changes are made to the spreadsheet.
  1. Checked Google Sheets Permissions:
  • Confirmed that the Google Account used for authentication has full editing permissions on the targeted spreadsheet.
  1. Monitored Logs for Errors:
  • No errors are being thrown; the workflow completes successfully but does not append data.

Expected Result

The Google Sheets Append Node should append the provided data to the next available row in the specified Google Sheet.


Actual Result

The workflow completes without errors, but the spreadsheet is not updated. No new rows are added.


Request for Assistance

I would appreciate any guidance on how to resolve this issue. If additional logs or screenshots are required, please let me know.

Thank you in advance for your help!

Thank you for the detailed explanation and illustration of your case. Nothing looks wrong in your workflow. There is one frequent cause to this type of Google Sheets behavior tho.

Check this solution and the topic overall. Maybe your solution is there.

TL;DR: scroll the sheet all the way down to see if data is added somewhere you didn’t expect it to be.

No luck, it appears to just not be updating or adding anything at all on the entire document… any other ideas or ways to achieve what im trying todo?

What errors do you get?

BTW, $json isn’t available in Run once for all items mode in Code nodes.
You need Run once for each item.

So its very likely that the Code node failed or returned no data terminating the workflow prematurely.

If this helps you to resolve your question, please mark this post as a :white_check_mark: Solution.

https://i.imgur.com/hZn407F.png I just switched it to run once per item, but its giving me this error now.

and to answer your question, none previous to what I just posted.

It says you need to return an object, while you’re returning an array that consists of a single object.
Remove square brackets in your return statement.
I’d recommend reading n8n docs on n8n data structure. It will clarify a lot to you.

I updated my Code1 to be this now, =// Extracting information from the previous Google Drive Copy Node
const documentId = $json[“spreadsheetId”] || $json[“documentId”]; // Adjust according to your node output
const documentName = $json[“document_name”] || “Default Document Name”;

// Generate URLs dynamically
const googleDocsLink = https://docs.google.com/document/d/${documentId}/edit;
const googleSheetsLink = https://docs.google.com/spreadsheets/d/${documentId}/edit;

// Prepare the data as an array of arrays (rows and columns)
const dataArray = [
[
$json[“client name”] || “ERIC DAVID”,
$json[“address”] || “435 Sunset Blvd, Malibu, CA”,
$json[“event date (short)”] || “7/15/25”,
$json[“event date (long)”] || “15th July 2025”,
$json[“event type”] || “birthday party”,
$json[“guest count”] || “50”,
$json[“price per person”] || “$75”,
$json[“event time”] || “5:30 PM”,
$json[“phone number”] || “(310) 555-7823”,
$json[“email address”] || “[email protected]”,
$json[“food style”] || “Mediterranean-inspired”,
$json[“food serving style”] || “buffet”,
$json[“food allergies”] || “vegetarian, nuts”,
$json[“additional services”] || “bartending”,
documentName
]
];

// Prepare the JSON output
const data = {
“client name”: $json[“client name”] || “ERIC DAVID”,
“address”: $json[“address”] || “435 Sunset Blvd, Malibu, CA”,
“event date (short)”: $json[“event date (short)”] || “7/15/25”,
“event date (long)”: $json[“event date (long)”] || “15th July 2025”,
“event type”: $json[“event type”] || “birthday party”,
“guest count”: $json[“guest count”] || “50”,
“price per person”: $json[“price per person”] || “$75”,
“event time”: $json[“event time”] || “5:30 PM”,
“phone number”: $json[“phone number”] || “(310) 555-7823”,
“email address”: $json[“email address”] || “[email protected]”,
“food style”: $json[“food style”] || “Mediterranean-inspired”,
“food serving style”: $json[“food serving style”] || “buffet”,
“food allergies”: $json[“food allergies”] || “vegetarian, nuts”,
“additional services”: $json[“additional services”] || “bartending”,
“document name”: documentName,
“data”: dataArray,
“document_id”: documentId || “Unknown”,
“google_docs_link”: googleDocsLink,
“google_sheets_link”: googleSheetsLink,
“document_name_expression”: {{ $('Code').item.json['document_name'] }},
“document_id_expression”: {{ $('Code').item.json['document_id'] }},
“google_docs_link_expression”: {{ $('Code').item.json['google_docs_link'] }},
“google_sheets_link_expression”: {{ $('Code').item.json['google_sheets_link'] }}
};

// Return the object directly (not as an array)
return { json: data };

I also updated the update node to try and just do one cell using a different input method, but still it doesn’t seem to update my value https://i.imgur.com/9B50ZCU.png
I’m receiving this in the chat https://i.imgur.com/5L4fjR3.png

Please post your updated code node. Unformatted code is hard to read.

Did you know you can paste screenshots with Ctrl/Cmd-V straight in the your message?

You do not need handlebars ({{ or }}) in Javascript code. The expression inside is a perfectly valid code (unless it contains errors of course).

Sorry about that. I’ve been primarily using ChatGPT to write the code and just problem solving as a go, as I haven’t actually learned proper coding. This is the updated workflow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.