Google Sheets Upsert Example
@pierce
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
upsert_row

Upsert a row of data in a Google Sheet

configure

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

My Drive

The Spreadsheet ID

Your sheet name

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"] }}).

[0]:
 
Enter a value for Insert - Cells / Column Values

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

 
Enter a value for Key Column

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

 
Enter a value for Key Value

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.
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" } }}).

 
key
 
value