{"record":{"id":"79f06d7c9859284d","repo":"paperclipai/paperclip","slug":"google-sheets-service-account-credentials-are-requ","errorCode":null,"errorMessage":"Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH.","messagePattern":"Google Sheets service-account credentials are required\\. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/google-sheets-mcp-server/src/config.ts","lineNumber":94,"sourceCode":"\nfunction isLoopbackBindHost(host: string): boolean {\n  const normalized = host.trim().toLowerCase().replace(/^\\[(.*)\\]$/, \"$1\");\n  if (normalized === \"localhost\" || normalized === \"::1\") return true;\n  if (isIP(normalized) === 4) {\n    return normalized.split(\".\")[0] === \"127\";\n  }\n  return false;\n}\n\nfunction readServiceAccountJson(input: GoogleSheetsMcpConfigInput): { raw: string; source: string } {\n  const explicitPath = input.serviceAccountJsonPath?.trim();\n  if (explicitPath) {\n    return { raw: readFileSync(explicitPath, \"utf8\"), source: explicitPath };\n  }\n\n  const inlineOrPath = input.serviceAccountJson?.trim();\n  if (!inlineOrPath) {\n    throw new Error(\n      \"Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH.\",\n    );\n  }\n\n  if (inlineOrPath.startsWith(\"{\")) {\n    return { raw: inlineOrPath, source: \"inline JSON\" };\n  }\n\n  return { raw: readFileSync(inlineOrPath, \"utf8\"), source: inlineOrPath };\n}\n\nexport function createGoogleSheetsMcpConfig(input: GoogleSheetsMcpConfigInput): GoogleSheetsMcpConfig {\n  const allowedSpreadsheetIds = parseAllowedSpreadsheetIds(input.allowedSpreadsheetIds);\n  if (allowedSpreadsheetIds.length === 0) {\n    throw new Error(\"At least one allowed spreadsheet ID is required.\");\n  }\n\n  const { raw, source } = readServiceAccountJson(input);","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/google-sheets-mcp-server/src/config.ts#L76-L112","documentation":"Error \"Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/google-sheets-mcp-server/src/config.ts:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON to the service-account JSON, or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH to a file containing it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}