Google Sheets

GOOGLESHEETS_UPSERT_ROWS

Upsert rows - update existing rows by key, append new ones. Automatically handles column mapping and partial updates. Use for: CRM syncs (match Lead ID), transaction imports (match Transaction ID), inventory updates (match SKU), calendar syncs (match Event ID). Features: - Auto-adds missing columns to sheet - Partial column updates (only update Phone + Status, preserve other columns) - Column order doesn't matter (auto-maps by header name) - Prevents duplicates by matching key column Example inputs: - Contact update: keyColumn='Email', headers=['Email','Phone','Status'], data=[['[email protected]','555-0101','Active']] - Inventory sync: keyColumn='SKU', headers=['SKU','Stock','Price'], data=[['WIDGET-001',50,9.99],['GADGET-002',30,19.99]] - CRM lead update: keyColumn='Lead ID', headers=['Lead ID','Score','Status'], data=[['L-12345',85,'Hot']] - Partial update: keyColumn='Email', headers=['Email','Phone'] (only updates Phone, preserves Name/Address/etc)

Remote googlesheets

Other tools also called GOOGLESHEETS_UPSERT_ROWS? See providers with this name

Input Schema


            {
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "2D array of data rows to upsert (no header row). Each row should have values matching the headers list. Cell values can be strings, numbers, booleans, or null. You can provide a subset of columns - other columns in the sheet will be preserved during updates. Example inputs: [['[email protected]', '555-0101', 'Active'], ['[email protected]', '555-0102', 'Pending']] for contacts, [['WIDGET-001', 50, 9.99], ['GADGET-002', 30, 19.99]] for inventory, [['L-12345', 'John Doe', 85]] for single CRM lead update.\nExamples:\n  [[\"[email protected]\",\"555-0101\",\"Active\"],[\"[email protected]\",\"555-0102\",\"Pending\"]]\n  [[\"WIDGET-001\",50,9.99],[\"GADGET-002\",30,19.99]]\n  [[\"L-12345\",\"John Doe\",85]]"
    },
    "headers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of column names for the data. These will be matched against sheet headers. If a column doesn't exist in the sheet, it will be added automatically. Order doesn't need to match sheet order. Example inputs: ['Email', 'Phone', 'Status'] for contact updates, ['Lead ID', 'Name', 'Score'] for CRM, ['SKU', 'Stock', 'Price'] for inventory.\nExamples:\n  [\"Email\",\"Phone\",\"Status\"]\n  [\"Lead ID\",\"Name\",\"Score\"]\n  [\"SKU\",\"Stock\",\"Price\"]"
    },
    "keyColumn": {
      "type": "string",
      "description": "The column NAME to use as unique identifier for matching rows. Must match a header name exactly. Example inputs: 'Email' (for contact lists), 'ID' (for records), 'SKU' (for inventory), 'Transaction Number' (for financial data), 'Lead ID' (for CRM).\nExamples:\n  \"Email\"\n  \"ID\"\n  \"SKU\"\n  \"Lead ID\"\n  \"Transaction Number\""
    },
    "sheetName": {
      "type": "string",
      "description": "The name of the sheet/tab within the spreadsheet.\nExamples:\n  \"Leads\"\n  \"Transactions\"\n  \"Inventory\""
    },
    "tableStart": {
      "type": [
        "string",
        "null"
      ],
      "default": "A1",
      "description": "Cell where the table starts (where headers are located). Defaults to 'A1'. Use this if your table is offset (e.g., 'C5', 'D10').\nExamples:\n  \"A1\"\n  \"C5\"\n  \"D10\""
    },
    "spreadsheetId": {
      "type": "string",
      "description": "The ID of the spreadsheet.\nExample: \"1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\""
    }
  }
}