Tool

Upsert row

The Google Sheets Upsert Row tool allows you to add or update rows in a Google Sheets spreadsheet seamlessly. It simplifies data management by enabling automatic insertion or updating of row data based on a specified key column.

Google Sheets

Features

  • Supports inserting new rows if the key value does not exist.
  • Automatically updates existing rows based on the specified key column without duplicating data.
  • Allows selection of specific Google Drive folders or Shared Drives for spreadsheet storage.
  • Enables targeting specific worksheets within a spreadsheet using worksheet IDs.
  • Supports custom expressions for dynamic row data insertion and updates.

Benefits

  • Enhances data accuracy by preventing duplicate entries.
  • Saves time with automated row insertion and update processes.
  • Improves workflow efficiency through integration with Google Sheets API.
  • Provides flexibility in managing data across multiple sheets and drives.
  • Reduces manual errors by automating spreadsheet data operations.

Description

Upsert a row of data in a Google Sheet. See the documentation

IMPORTANT: The arguments have specific formats. Please follow the instructions below:

  • insert: Return JSON in this format: string[]

Parameters

7 parameters

NameTypeDescription
drivestring

Defaults to My Drive. To select a Shared Drive instead, select it from this list.

You can use the "retrieve_options" tool using these parameters to get the values. key: google_sheets-upsert-row, propName: drive.

sheetIdrequiredstring

Select a spreadsheet or provide a spreadsheet ID

You can use the "retrieve_options" tool using these parameters to get the values. key: google_sheets-upsert-row, propName: sheetId.

worksheetIdrequiredinteger

Select a worksheet or provide a worksheet ID

You can use the "retrieve_options" tool using these parameters to get the values. key: google_sheets-upsert-row, propName: worksheetId.

insertrequiredstring[]

Insert statement: the row data you want to add to the Google sheet if the key doesn't exist. If the key does exist and Update is not set, the row will be updated using this array. Enter individual cell values or enter a custom expression to pass an array with each element representing a cell/column value (e.g. {{ [5, "test"] }}).

columnrequiredstring

The column of the sheet to lookup (e.g. A). This column functions as the key column for the upsert operation.

valuestring

The value of the key to search for in Key Column. Defaults to the value in Insert's "key" column if left blank.

updatesobject

Update statment: if the spreadsheet contains duplicate key Value in some row in the specified Column, individual cells in the first duplicate row will be updated using this object's column-value pairs.<br /> Enter the column name for the key (e.g. B) and the corresponding column value (e.g. test). You may also enter a custom expression and pass a JSON object with key/value pairs representing columns and values (e.g. {{ { A: 5, B: "test" } }}).

Ready to vibe automate?

Join thousands of people who have transformed their workflows.

Workflows

Automations with AI agents

Collections

All your data, searchable

Chat Widget

Drop-in widget for your website

Developer API

Build AI-powered apps with ease

    We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy