Budibase/budibase · error · HTTPError
Google config not found
Error message
Google config not found
What it means
connect() loads the workspace's Google datasource OAuth configuration from the config store and initialises an OAuth2Client. If no Google config exists (no clientID/clientSecret registered), setup cannot proceed and it throws HTTPError 400. This is a workspace-level configuration prerequisite for any Google Sheets operation.
Source
Thrown at packages/server/src/integrations/googlesheets.ts:243
`Error authenticating with google sheets. ${json.error_description}`
)
}
return json
}
private async connect() {
try {
const bbCtx = context.getCurrentContext()
let oauthClient = bbCtx?.googleSheets?.oauthClient
if (!oauthClient) {
await setupCreationAuth(this.config)
// Initialise oAuth client
const googleConfig = await configs.getGoogleDatasourceConfig()
if (!googleConfig) {
throw new HTTPError("Google config not found", 400)
}
oauthClient = new OAuth2Client({
clientId: googleConfig.clientID,
clientSecret: googleConfig.clientSecret,
})
const tokenResponse = await this.fetchAccessToken({
client_id: googleConfig.clientID,
client_secret: googleConfig.clientSecret,
refresh_token: this.config.auth.refreshToken,
})
oauthClient.setCredentials({
refresh_token: this.config.auth.refreshToken,
access_token: tokenResponse.access_token,
})
if (bbCtx && !bbCtx.googleSheets) {View on GitHub (pinned to a81a902e9a)
Solutions
- Complete the Google OAuth setup for the environment so getGoogleDatasourceConfig() returns a config (clientID + clientSecret)
- Verify the config store (DB) actually contains the Google datasource config document for the current tenant
- Check that environment variables used to seed the Google config are set on the server
- Confirm the request is hitting the tenant/workspace where the config was created, not a different one
Defensive patterns
Strategy: try-catch
Validate before calling
import configs from './configs'
async function ensureGoogleConfig() {
const googleConfig = await configs.getGoogleDatasourceConfig()
if (!googleConfig || !googleConfig.clientID || !googleConfig.clientSecret) {
throw new HTTPError('Google OAuth config missing — complete environment setup first', 400)
}
return googleConfig
} Type guard
function hasGoogleConfig(c) {
return c != null && typeof c.clientID === 'string' && typeof c.clientSecret === 'string'
} Try / catch
try {
await integration.connect()
} catch (err) {
if (err.status === 400 && err.message === 'Google config not found') {
// run the Google OAuth environment setup / guide admin to configure it
} else throw err
} Prevention
- Run the Google OAuth setup step as part of environment bootstrap/self-host install
- Add a health/config check endpoint that surfaces missing Google config early
- Keep config store backups so migration doesn't drop the Google config doc
- Confirm tenant context is correct before config lookups
When it happens
Trigger: Calling connect — and anything that depends on it: testConnection, getTableNames, buildSchema, createTable, updateTable, deleteTable — when configs.getGoogleDatasourceConfig() returns null/undefined, i.e. no Google OAuth client config has been created in the environment.
Common situations: Self-hosted install where the Google OAuth client config was never set up (required env/config step skipped); config store cleared or migrated to a new DB; wrong tenant/workspace queried so the config lookup misses; production env lacking the setup that existed locally.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- No google configuration found
- Configuration invalid. Must contain google clientID and clie
- Error constructing google authentication strategy: ${err}
- Slack OAuth client credentials are not configured
- No Microsoft datasource configuration found
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/7ccc0a129cf840b5.
Report an issue: GitHub.