appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
Missing required field 'Spreadsheet Url'
What it means
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.
Source
Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileInfoMethod.java:92
assert sheets != null;
List<JsonNode> sheetMetadata = new ArrayList<>();
for (JsonNode sheet : sheets) {
final JsonNode properties = sheet.get("properties");
if (!properties.get("title").asText().isEmpty()) {
sheetMetadata.add(properties);
}
}
methodConfig.setBody(sheetMetadata);
return methodConfig;
});
}
@Override
public boolean validateExecutionMethodRequest(MethodConfig methodConfig) {
if (methodConfig.getSpreadsheetId() == null
|| methodConfig.getSpreadsheetId().isBlank()) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_SPREADSHEET_URL_ERROR_MSG);
}
return true;
}
@Override
public WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig) {
UriComponentsBuilder uriBuilder = getBaseUriBuilder(
this.BASE_DRIVE_API_URL,
methodConfig.getSpreadsheetId()
+ "?supportsAllDrives=true&fields=id,name,permissions/role,permissions/emailAddress,createdTime,modifiedTime");
return webClient
.method(HttpMethod.GET)
.uri(uriBuilder.build(false).toUri())
.body(BodyInserters.empty());View on GitHub (pinned to 8cd9021c24)
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).
Example fix
// before
{
"sheetUrl": "https://goo.gl/abcd" // short link, id not extractable
}
// after
{
"sheetUrl": "https://docs.google.com/spreadsheets/d/1AbC...xyz/edit"
} Defensive patterns
Strategy: validation
Validate before calling
// Validate the URL pattern before running Get Spreadsheet Details.
function isValidSheetUrl(url) {
return typeof url === "string" && /^https:\/\/docs\.google\.com\/spreadsheets\/d\//.test(url);
}
// Run action only when valid: {{ isValidSheetUrl(urlInput.text) ? runInfo() : null }} Type guard
function isNonBlankString(v) { return typeof v === "string" && v.trim().length > 0; } Try / catch
if (getInfo.error && getInfo.error.message.includes("Missing required field 'Spreadsheet Url'")) {
showToast("Provide a valid Google Sheets URL.", "error");
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/a49648dbf186ff2c.
Report an issue: GitHub.