{"record":{"id":"fcdbabfa5c15b733","repo":"Budibase/budibase","slug":"column-type-column-type-not-allowed-for-gsheet","errorCode":null,"errorMessage":"Column type: ${column.type} not allowed for GSheets integration.","messagePattern":"Column type: (.+?) not allowed for GSheets integration\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/integrations/googlesheets.ts","lineNumber":514,"sourceCode":"        if (header === table._rename.old) {\n          headers.push(table._rename.updated)\n        } else {\n          headers.push(header)\n        }\n      }\n      try {\n        await sheet.setHeaderRow(headers)\n      } catch (err) {\n        console.error(\"Error updating column name in google sheets\", err)\n        throw err\n      }\n    } else {\n      const updatedHeaderValues = [...sheet.headerValues]\n\n      // add new column - doesn't currently exist\n      for (let [key, column] of Object.entries(table.schema)) {\n        if (!ALLOWED_TYPES.includes(column.type)) {\n          throw new Error(\n            `Column type: ${column.type} not allowed for GSheets integration.`\n          )\n        }\n        if (\n          !sheet.headerValues.includes(key) &&\n          column.type !== FieldType.FORMULA &&\n          column.type !== FieldType.AI\n        ) {\n          updatedHeaderValues.push(key)\n        }\n      }\n\n      try {\n        if (updatedHeaderValues.length > sheet.gridProperties.columnCount) {\n          await sheet.resize({\n            rowCount: sheet.rowCount,\n            columnCount: updatedHeaderValues.length,\n          })","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/integrations/googlesheets.ts#L496-L532","documentation":"updateTable adds new columns to a sheet by mapping table.schema field types to spreadsheet headers. Google Sheets only supports a subset of field types (strings, numbers, dates, booleans, etc. in ALLOWED_TYPES); if any column in the schema has a disallowed type (e.g. LINKED, JSON, ATTACHMENT), it throws before touching the sheet.","triggerScenarios":"Calling query({ operation: 'UPDATE_TABLE' }) where the new schema contains a column whose type is not in ALLOWED_TYPES — checked for every entry of table.schema before adding missing headers.","commonSituations":"Syncing a Budibase table that has relationship/attachment/formula columns into Google Sheets; schema auto-derived from another datasource including GSheets-incompatible types; user manually added a rich type to the schema.","solutions":["Remove or convert unsupported columns (attachments, relationships, JSON, etc.) from the table schema before running UPDATE_TABLE","Change the column type to one of the allowed GSheets types (string, number, boolean, datetime) in the builder","Split the data: keep unsupported fields in a different table/datasource","Check ALLOWED_TYPES in googlesheets.ts to see exactly which types are permitted"],"exampleFix":"// before\nschema: { Avatar: { type: 'attachment', name: 'Avatar' } } // throws\n// after\nschema: { AvatarUrl: { type: 'string', name: 'AvatarUrl' } }","handlingStrategy":"validation","validationCode":"const ALLOWED_TYPES = ['string','number','boolean','datetime','barcode','barcodeqr']\nfunction assertSchemaAllowed(schema) {\n  for (const [key, col] of Object.entries(schema)) {\n    if (!ALLOWED_TYPES.includes(col.type)) {\n      throw new Error(`Column '${key}' type '${col.type}' is not supported by Google Sheets`)\n    }\n  }\n}","typeGuard":"function isGSheetsCompatibleColumn(col) {\n  return ['string','number','boolean','datetime'].includes(col?.type)\n}","tryCatchPattern":"try {\n  await integration.query({ operation: 'UPDATE_TABLE', table })\n} catch (err) {\n  if (err.message.startsWith('Column type:')) {\n    // strip or convert the offending column, then retry\n  } else throw err\n}","preventionTips":["Filter schema to allowed types before syncing tables into GSheets","Keep attachments/relationships/JSON fields out of GSheets-backed tables","Check ALLOWED_TYPES in googlesheets.ts whenever adding new field types"],"tags":["google-sheets","schema","unsupported-type"],"backgroundTag":"schema-type-not-supported","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}