{"record":{"id":"24f845e4972d7f2c","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-24f845","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/ClearMethod.java","lineNumber":30,"sourceCode":"import java.net.URLEncoder;\nimport java.nio.charset.StandardCharsets;\n\n/**\n * API reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear\n */\npublic class ClearMethod implements ExecutionMethod {\n\n    ObjectMapper objectMapper;\n\n    public ClearMethod(ObjectMapper objectMapper) {\n        this.objectMapper = objectMapper;\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        if (methodConfig.getSpreadsheetRange() == null\n                || methodConfig.getSpreadsheetRange().isBlank()) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_CELL_RANGE_ERROR_MSG);\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_SHEETS_API_URL,\n                methodConfig.getSpreadsheetId() /* spreadsheet Id */\n                        + \"/values/\"\n                        + URLEncoder.encode(","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ClearMethod.java#L12-L48","documentation":"ClearMethod.validateExecutionMethodRequest (ClearMethod.java:27-32) throws this when the spreadsheet ID extracted from the form data is null or blank. The spreadsheet ID is derived from the 'Spreadsheet Url' field and is essential for constructing the Google Sheets API clear endpoint URI. Categorized as PLUGIN_EXECUTE_ARGUMENT_ERROR (PE-ARG-5000) with message 'Missing required field \\'Spreadsheet Url\\''.","triggerScenarios":"The Google Sheets 'Clear' operation is executed but the Spreadsheet URL field is empty, null, or contains only whitespace. The methodConfig.getSpreadsheetId() returns null or a blank string, failing the null/blank check at lines 28-29.","commonSituations":"1) User selects the Clear method but forgets to enter the spreadsheet URL. 2) The spreadsheet URL binding evaluates to empty at runtime. 3) The URL was entered but the spreadsheet ID extraction upstream failed, resulting in a blank ID. 4) Copy-pasting a URL that doesn't match the expected Google Sheets URL format.","solutions":["Enter a valid Google Sheets URL in the 'Spreadsheet Url' field, e.g. https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit.","If using JS bindings, ensure the expression returns a non-empty valid spreadsheet URL.","Verify the URL is a Google Sheets URL — other URL formats may not yield a valid spreadsheet ID.","Check that the spreadsheet has not been deleted or made inaccessible."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate spreadsheet URL is non-empty before clear operation\nif (!form.spreadsheetUrl || form.spreadsheetUrl.trim() === '') {\n  showAlert('Spreadsheet URL is required for the Clear operation', 'error');\n} else {\n  await sheetsClearQuery.run();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always provide a valid Google Sheets URL in the Spreadsheet Url field.","Use the URL picker to select from accessible spreadsheads.","Verify JS bindings for the URL return non-empty values."],"tags":["google-sheets","spreadsheet-url","validation","clear-method","appsmith"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}