Google Sheets (Service Account) icon

Google Sheets (Service Account)

Access Google Sheets API using Service Account

Actions11

Row → Delete

AI-generated

Overview

This node allows users to delete rows from a Google Sheets spreadsheet using a service account for authentication. It supports both credential-based and manual authentication methods. Users specify the spreadsheet ID, sheet name, and the range of rows to delete by providing start and end indices (0-based, with the end index exclusive). This operation is useful for automating the removal of unwanted or outdated data rows in Google Sheets within workflows.

Use Case Examples

  1. Automatically delete rows 5 to 10 in a sales report spreadsheet to remove outdated entries.
  2. Remove header rows or empty rows from a data sheet before processing the data further.

Properties

Name Meaning
Authentication Choose the authentication method: use saved credentials or enter service account details manually.
Service Account Email Email address of the service account used for authentication (required if manual authentication is selected).
Private Key Private key from the service account JSON used for authentication (required if manual authentication is selected).
Impersonate Email (Optional) Email of the user to impersonate, requires domain-wide delegation (optional, manual authentication only).
Spreadsheet ID The ID of the Google Sheets spreadsheet where rows will be deleted.
Start Index The zero-based start index of the row range to delete (inclusive).
End Index The zero-based end index of the row range to delete (exclusive).

Output

JSON

  • json - The response data from the Google Sheets API after deleting the specified rows.

Dependencies

  • Google Sheets API
  • Google service account credentials

Troubleshooting

  • Ensure the service account has the necessary permissions to access and modify the specified spreadsheet.
  • Verify that the spreadsheet ID and sheet name are correct and that the sheet exists in the spreadsheet.
  • Check that the start and end indices are within the valid range of rows in the sheet; invalid indices may cause errors.
  • If using manual authentication, ensure the private key is correctly formatted and includes proper newline characters.
    Common error: 'Sheet "" not found' indicates the specified sheet name does not exist in the spreadsheet; verify the sheet name spelling and existence.

Links

Discussion