{"record":{"id":"cb9324777a4b057a","repo":"Budibase/budibase","slug":"gsheets-integration-does-not-support-json-opera","errorCode":null,"errorMessage":"GSheets integration does not support \"${json.operation}\".","messagePattern":"GSheets integration does not support \"(.+?)\"\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/integrations/googlesheets.ts","lineNumber":454,"sourceCode":"        })\n      case Operation.CREATE_TABLE:\n        if (!json.table) {\n          throw new Error(\n            \"attempted to create a table without specifying the table to create\"\n          )\n        }\n        return this.createTable(json.table)\n      case Operation.UPDATE_TABLE:\n        if (!json.table) {\n          throw new Error(\n            \"attempted to create a table without specifying the table to create\"\n          )\n        }\n        return this.updateTable(json.table)\n      case Operation.DELETE_TABLE:\n        return this.deleteTable(json?.table?.name)\n      default:\n        throw new Error(\n          `GSheets integration does not support \"${json.operation}\".`\n        )\n    }\n  }\n\n  private buildRowObject(\n    headers: string[],\n    values: Record<string, string>,\n    rowNumber: number\n  ) {\n    const rowObject: { rowNumber: number } & Row = {\n      rowNumber,\n      _id: rowNumber.toString(),\n    }\n    for (let i = 0; i < headers.length; i++) {\n      rowObject[headers[i]] = values[headers[i]]\n    }\n    return rowObject","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/integrations/googlesheets.ts#L436-L472","documentation":"query() is a switch over json.operation; if the operation string is not one of the supported Google Sheets operations (READ, CREATE_ROW, UPDATE_ROW, DELETE_ROW, CREATE_TABLE, UPDATE_TABLE, DELETE_TABLE, etc.), the default branch throws. It usually means the operation name is misspelled or an operation from a different integration (e.g. SQL) was sent to GSheets.","triggerScenarios":"Calling query() with an operation value outside the switch cases — e.g. a typo like 'CREAT_TABLE', an unsupported verb like 'BULK_INSERT', or passing undefined operation.","commonSituations":"Reusing a query definition built for another integration; version drift where an operation was added to the platform but not yet supported by the GSheets integration; stringly-typed operation values from custom scripts.","solutions":["Check the exact json.operation value being sent and match it to one of the supported Operation enum values for GSheets","Log or inspect the outgoing query payload to catch typos or undefined operations","Update Budibase if a newer version supports the operation you need","If building payloads dynamically, validate the operation against the integration's supported list before calling query"],"exampleFix":"// before\nawait integration.query({ operation: 'DELETE_MANY' })\n// after\nawait integration.query({ operation: Operation.READ, table: { name: 'Customers' } })","handlingStrategy":"type-guard","validationCode":"import { Operation } from './types' // supported set for GSheets\nconst SUPPORTED = new Set(Object.values(Operation))\nfunction assertSupportedOperation(json) {\n  if (!SUPPORTED.has(json.operation)) {\n    throw new Error(`Unsupported GSheets operation: ${json.operation}`)\n  }\n}","typeGuard":"function isSupportedOperation(op) {\n  return ['READ','CREATE_ROW','UPDATE_ROW','DELETE_ROW','CREATE_TABLE','UPDATE_TABLE','DELETE_TABLE'].includes(op)\n}","tryCatchPattern":"try {\n  await integration.query(json)\n} catch (err) {\n  if (err.message.startsWith('GSheets integration does not support')) {\n    // log json.operation, correct or route the query to the right integration\n  } else throw err\n}","preventionTips":["Import and use the Operation enum instead of raw strings","Route queries to integrations based on datasource type, reusing SQL-style ops for GSheets fails","Add a test enumerating all enum values against the GSheets switch"],"tags":["google-sheets","unsupported-operation","validation"],"backgroundTag":"unsupported-operation","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}