{"record":{"id":"536c0870660b2f64","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-536c08","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/CopyMethod.java","lineNumber":27,"sourceCode":"import org.springframework.web.reactive.function.client.WebClient;\nimport org.springframework.web.util.UriComponentsBuilder;\n\n/**\n * API reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo\n */\npublic class CopyMethod implements ExecutionMethod {\n\n    ObjectMapper objectMapper;\n\n    public CopyMethod(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.getSheetId() == null || methodConfig.getSheetId().isBlank()) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_SHEET_ID_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                        + \"/sheets/\"\n                        + methodConfig.getSheetId() /* sheet Id*/\n                        + \":copyTo\",","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/CopyMethod.java#L9-L45","documentation":"CopyMethod.validateExecutionMethodRequest (CopyMethod.java:24-29) throws this when the spreadsheet ID for the Copy sheet operation is null or blank. The spreadsheet ID is derived from the 'Spreadsheet Url' field and is needed to construct the copyTo API endpoint URI. Categorized as PLUGIN_EXECUTE_ARGUMENT_ERROR (PE-ARG-5000) with message 'Missing required field \\'Spreadsheet Url\\''.","triggerScenarios":"The Google Sheets 'Copy sheet' operation is executed but the Spreadsheet URL field is empty, null, or whitespace-only. methodConfig.getSpreadsheetId() returns null or blank, failing the check at lines 25-26.","commonSituations":"1) User selects the Copy method but forgets the spreadsheet URL. 2) JS binding for the spreadsheet URL returns empty. 3) URL was pasted incorrectly or is from a non-Google-Sheets source. 4) The spreadsheet was deleted between configuration and execution.","solutions":["Enter a valid Google Sheets URL in the 'Spreadsheet Url' field.","If using JS bindings, ensure the expression returns a non-empty valid spreadsheet URL.","Verify the spreadsheet exists and the connected account has access to it.","Use the URL picker in the query editor to select from available spreadsheets."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate spreadsheet URL is non-empty before copy operation\nif (!form.spreadsheetUrl || form.spreadsheetUrl.trim() === '') {\n  showAlert('Spreadsheet URL is required for the Copy sheet operation', 'error');\n} else {\n  await sheetsCopyQuery.run();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always provide a valid Google Sheets URL for the Copy operation.","Verify the spreadsheet exists and the connected account has access.","Use the URL picker to avoid typos."],"tags":["google-sheets","spreadsheet-url","validation","copy-method","appsmith"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}