{"record":{"id":"a49648dbf186ff2c","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-a49648","errorCode":"PE-ARG-5000","errorMessage":"Missing required field 'Spreadsheet Url'","messagePattern":"Missing required field 'Spreadsheet Url'","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileInfoMethod.java","lineNumber":92,"sourceCode":"\n                            assert sheets != null;\n                            List<JsonNode> sheetMetadata = new ArrayList<>();\n                            for (JsonNode sheet : sheets) {\n                                final JsonNode properties = sheet.get(\"properties\");\n                                if (!properties.get(\"title\").asText().isEmpty()) {\n                                    sheetMetadata.add(properties);\n                                }\n                            }\n                            methodConfig.setBody(sheetMetadata);\n                            return methodConfig;\n                        });\n    }\n\n    @Override\n    public boolean validateExecutionMethodRequest(MethodConfig methodConfig) {\n        if (methodConfig.getSpreadsheetId() == null\n                || methodConfig.getSpreadsheetId().isBlank()) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_SPREADSHEET_URL_ERROR_MSG);\n        }\n\n        return true;\n    }\n\n    @Override\n    public WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig) {\n\n        UriComponentsBuilder uriBuilder = getBaseUriBuilder(\n                this.BASE_DRIVE_API_URL,\n                methodConfig.getSpreadsheetId()\n                        + \"?supportsAllDrives=true&fields=id,name,permissions/role,permissions/emailAddress,createdTime,modifiedTime\");\n\n        return webClient\n                .method(HttpMethod.GET)\n                .uri(uriBuilder.build(false).toUri())\n                .body(BodyInserters.empty());","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileInfoMethod.java#L74-L110","documentation":"Thrown by FileInfoMethod.validateExecutionMethodRequest (FileInfoMethod.java:92) when `methodConfig.getSpreadsheetId()` is null or blank. The 'Get Spreadsheet Details' action calls the Drive API `files/{id}` endpoint, so a missing id cannot form the request. Code PE-ARG-5000.","triggerScenarios":"Running the 'Get Spreadsheet Details' / file-info action with an empty Spreadsheet URL field, or a URL from which no id could be extracted (id is null). Validation fires pre-flight before getExecutionClient builds the URI.","commonSituations":"URL binding resolves to empty (widget not yet populated); user pasted a shortened `goo.gl`/share link that does not match the extraction regex; the URL field was conditionally hidden and submitted blank; copy-paste included surrounding whitespace only.","solutions":["Supply a full canonical URL: `https://docs.google.com/spreadsheets/d/<id>/edit`.","Resolve the redirect on any shortened share link first so the final URL matches `https://docs.google.com/spreadsheets/d/<id>/`.","Bind the URL field to a widget whose value is guaranteed non-empty at submit time (e.g. default the select widget)."],"exampleFix":"// before\n{\n  \"sheetUrl\": \"https://goo.gl/abcd\"   // short link, id not extractable\n}\n// after\n{\n  \"sheetUrl\": \"https://docs.google.com/spreadsheets/d/1AbC...xyz/edit\"\n}","handlingStrategy":"validation","validationCode":"// Validate the URL pattern before running Get Spreadsheet Details.\nfunction isValidSheetUrl(url) {\n  return typeof url === \"string\" && /^https:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\//.test(url);\n}\n// Run action only when valid: {{ isValidSheetUrl(urlInput.text) ? runInfo() : null }}","typeGuard":"function isNonBlankString(v) { return typeof v === \"string\" && v.trim().length > 0; }","tryCatchPattern":"if (getInfo.error && getInfo.error.message.includes(\"Missing required field 'Spreadsheet Url'\")) {\n  showToast(\"Provide a valid Google Sheets URL.\", \"error\");\n}","preventionTips":["Resolve shortened share links to the full URL before pasting.","Default the URL widget to a known-good spreadsheet.","Validate the canonical pattern client-side before triggering the action."],"tags":["google-sheets","appsmith","input-validation","get-spreadsheet-info","required-field"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}