Budibase/budibase · error · Error
attempted to create a table without specifying the table to
Error message
attempted to create a table without specifying the table to create
What it means
The Google Sheets integration's query() dispatches on json.operation. For Operation.CREATE_TABLE it requires json.table containing the sheet schema to create; without it there is nothing to write, so it throws before calling this.createTable.
Source
Thrown at packages/server/src/integrations/googlesheets.ts:439
case Operation.READ:
return this.read({ ...json, sheet })
case Operation.UPDATE:
return this.update({
// exclude the header row and zero index
rowIndex: json.extra?.idFilter?.equal?.rowNumber,
sheet,
row: json.body,
table: json.table,
})
case Operation.DELETE:
return this.delete({
// exclude the header row and zero index
rowIndex: json.extra?.idFilter?.equal?.rowNumber,
sheet,
})
case Operation.CREATE_TABLE:
if (!json.table) {
throw new Error(
"attempted to create a table without specifying the table to create"
)
}
return this.createTable(json.table)
case Operation.UPDATE_TABLE:
if (!json.table) {
throw new Error(
"attempted to create a table without specifying the table to create"
)
}
return this.updateTable(json.table)
case Operation.DELETE_TABLE:
return this.deleteTable(json?.table?.name)
default:
throw new Error(
`GSheets integration does not support "${json.operation}".`
)
}View on GitHub (pinned to a81a902e9a)
Solutions
- Include a table object with at least a name and schema in the query JSON: { operation: 'CREATE_TABLE', table: { name: 'Sheet1', schema: {...} } }
- Check the upstream code that constructs the query body to ensure json.table is bound before dispatch
- Validate operation-specific payloads before invoking query
Example fix
// before
await integration.query({ operation: Operation.CREATE_TABLE })
// after
await integration.query({ operation: Operation.CREATE_TABLE, table: { name: 'Customers', schema: { Name: { type: 'string', name: 'Name' } } } }) Defensive patterns
Strategy: validation
Validate before calling
function assertCreateTablePayload(json) {
if (json.operation === 'CREATE_TABLE' && !json.table) {
throw new Error('CREATE_TABLE requires a table: { name, schema }')
}
} Type guard
function isCreateTablePayload(json) {
return json.operation === 'CREATE_TABLE' &&
typeof json.table === 'object' && json.table !== null &&
typeof json.table.name === 'string' && typeof json.table.schema === 'object'
} Try / catch
try {
await integration.query(json)
} catch (err) {
if (err.message.includes('without specifying the table to create')) {
// reject payload upstream / require the table schema in the UI
} else throw err
} Prevention
- Model payloads with a discriminated union so CREATE_TABLE demands a table object
- Validate query JSON against a schema (e.g. zod) before calling query
- Bind the table object from UI state at call time, not conditionally
When it happens
Trigger: Calling query({ operation: 'CREATE_TABLE' }) with no `table` property (or table: null/undefined) on the Google Sheets integration.
Common situations: Manually constructed query payloads missing the table object; a caller that builds the JSON from user input where the table/schema step was skipped; UI flow that triggered table creation without a name/schema bound.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- Invalid import url
- Only HTTP(S) URLs are allowed for query import
- Import url must not contain credentials
- GSheets integration does not support "${json.operation}".
- Unsupported operator: ${operator}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/a00be6a040227c23.
Report an issue: GitHub.