Google Sheets (Service Account) icon

Google Sheets (Service Account)

Access Google Sheets API using Service Account

Actions11

Row → Update

AI-generated

Overview

This node allows updating rows in a Google Sheets spreadsheet using a service account for authentication. It supports manual or credential-based authentication and enables users to specify the spreadsheet, sheet name, range, and data to update. This is useful for automating updates to spreadsheet data, such as modifying records or appending new information in workflows.

Use Case Examples

  1. Updating a specific range of cells in a Google Sheet with new data.
  2. Automating the update of rows in a spreadsheet based on external data sources.

Properties

Name Meaning
Authentication Choose authentication method: use saved credentials or enter manually.
Service Account Email Service account email address from the service account JSON, required if manual authentication is selected.
Private Key Private key from the service account JSON, required if manual authentication is selected.
Impersonate Email (Optional) Email of user to impersonate, requires domain-wide delegation, optional for manual authentication.
Spreadsheet ID The ID of the Google Sheets spreadsheet to update.
Sheet Name Name of the sheet within the spreadsheet to update.
Range The cell range to update (e.g., A1:D10).
Data Data to update as a JSON array of arrays, representing rows and columns.
Options Additional options for the update operation, including how input data should be interpreted.

Output

JSON

  • spreadsheetId - ID of the spreadsheet being updated
  • updatedRange - Range of cells that were updated
  • updatedRows - Number of rows updated
  • updatedColumns - Number of columns updated
  • updatedCells - Number of cells updated

Dependencies

  • Google Sheets API via googleapis library
  • Service account credentials or saved n8n credentials for authentication

Troubleshooting

  • Ensure the service account has access to the target spreadsheet, otherwise authorization errors will occur.
  • If using manual authentication, verify the private key format is correct and newline characters are properly handled.
  • Errors about missing sheets or ranges indicate the specified sheet name or range does not exist in the spreadsheet.
  • JSON data must be correctly formatted as an array of arrays; invalid JSON will cause parsing errors.

Links

Discussion