{"record":{"id":"3978dbb464c6da3e","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-3978db","errorCode":"PE-ARG-5000","errorMessage":"Cannot read spreadsheet URL. Please verify that the provided the Spreadsheet URL matches this pattern https://docs.google.com/spreadsheets/d/spreadsheetId_should_be_here/.","messagePattern":"Cannot read spreadsheet URL\\. Please verify that the provided the Spreadsheet URL matches this pattern https://docs\\.google\\.com/spreadsheets/d/spreadsheetId_should_be_here/\\.","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/MethodConfig.java","lineNumber":95,"sourceCode":"                    formData, FieldName.WHERE, new TypeReference<Map<String, Object>>() {}, new HashMap<>());\n            this.whereConditions = parseWhereClause(whereForm);\n        }\n\n        this.projection = getDataValueSafelyFromFormData(formData, FieldName.PROJECTION, new TypeReference<>() {});\n        // Always add rowIndex to a valid projection\n        if (this.projection != null && !this.projection.isEmpty()) {\n            this.projection.add(\"rowIndex\");\n        }\n        this.sortBy = getDataValueSafelyFromFormData(formData, FieldName.SORT_BY, new TypeReference<>() {});\n        this.paginateBy = getDataValueSafelyFromFormData(formData, FieldName.PAGINATION, new TypeReference<>() {});\n    }\n\n    private void setSpreadsheetUrlFromSpreadsheetId() {\n        final Matcher matcher = sheetRangePattern.matcher(spreadsheetUrl);\n        if (matcher.find()) {\n            this.spreadsheetId = matcher.group(1);\n        } else {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n                    ErrorMessages.SPREADSHEET_ID_NOT_FOUND_IN_URL_ERROR_MSG);\n        }\n    }\n\n    public MethodConfig(TriggerRequestDTO triggerRequestDTO) {\n        final Map<String, Object> parameters = triggerRequestDTO.getParameters();\n        switch (parameters.size()) {\n            case 4:\n                this.queryFormat = getValueSafelyFromFormDataAsString(parameters, QUERY_FORMAT);\n            case 3:\n            case 2:\n                this.tableHeaderIndex = getValueSafelyFromFormDataAsString(parameters, TABLE_HEADER_INDEX);\n                this.sheetName = getValueSafelyFromFormDataAsString(parameters, SHEET_NAME);\n            case 1:\n                this.spreadsheetUrl = getValueSafelyFromFormDataAsString(parameters, SHEET_URL);\n                setSpreadsheetUrlFromSpreadsheetId();\n        }","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/MethodConfig.java#L77-L113","documentation":"Thrown by MethodConfig.setSpreadsheetUrlFromSpreadsheetId (MethodConfig.java:95) when the supplied spreadsheet URL does not match the regex `https://docs.google.com/spreadsheets/d/([^/]+)/?.*`. The matcher's `find()` returns false, so no id group can be captured. Code PE-ARG-5000 (SPREADSHEET_ID_NOT_FOUND_IN_URL_ERROR_MSG).","triggerScenarios":"Any action whose Spreadsheet URL field contains a string that does not start with the literal `https://docs.google.com/spreadsheets/d/<something>/`. Examples: `http://` (wrong scheme), a mobile/share short link, a URL with extra subdomain, a bare id, or a docs.google.com/spreadsheet (singular) link.","commonSituations":"Pasting a `https://goo.gl/...` short link (unresolved); using `http://` instead of `https://`; an old `docs.google.com/spreadsheet/ccc?key=` legacy URL; a bare id `1AbC...xyz` without the path prefix; extra leading whitespace or quotes around the URL; a typo like `docs.google.com/spreadsheetsd/`.","solutions":["Use the canonical form: `https://docs.google.com/spreadsheets/d/<id>/edit`.","Resolve shortened/redirect links in a browser first and copy the final URL from the address bar.","Ensure the scheme is exactly `https://` (not `http://`) and the host is `docs.google.com`.","Strip surrounding quotes/whitespace from the bound value before submission."],"exampleFix":"// before\n{\n  \"sheetUrl\": \"https://goo.gl/abcd\"\n}\n// after\n{\n  \"sheetUrl\": \"https://docs.google.com/spreadsheets/d/1Bx...0Xc/edit#gid=0\"\n}","handlingStrategy":"validation","validationCode":"// Mirror the plugin regex client-side to catch bad URLs early.\nconst SHEET_URL_RE = /^https:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\//;\nfunction normalizeSheetUrl(url) {\n  const s = String(url == null ? \"\" : url).trim();\n  return SHEET_URL_RE.test(s) ? s : \"\"; // empty => block submit\n}","typeGuard":"function looksLikeSheetUrl(v) {\n  return typeof v === \"string\" && /^https:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/[\\w-]+/.test(v.trim());\n}","tryCatchPattern":"if (action.error && action.error.message.includes(\"Cannot read spreadsheet URL\")) {\n  showToast(\"Use a URL like https://docs.google.com/spreadsheets/d/<id>/edit\", \"error\");\n}","preventionTips":["Always paste the canonical URL from the browser address bar.","Resolve shortened share links first.","Strip whitespace/quotes and require the https:// scheme.","Avoid legacy ccc?key= URLs; use the /d/<id>/ form."],"tags":["google-sheets","appsmith","input-validation","url-parsing","regex","spreadsheet-id"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}