appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
Missing required field 'Spreadsheet Url'
What it means
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\''.
Source
Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/CopyMethod.java:27
import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.util.UriComponentsBuilder;
/**
* API reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo
*/
public class CopyMethod implements ExecutionMethod {
ObjectMapper objectMapper;
public CopyMethod(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
@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);
}
if (methodConfig.getSheetId() == null || methodConfig.getSheetId().isBlank()) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_SHEET_ID_ERROR_MSG);
}
return true;
}
@Override
public WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig) {
UriComponentsBuilder uriBuilder = getBaseUriBuilder(
this.BASE_SHEETS_API_URL,
methodConfig.getSpreadsheetId() /* spreadsheet Id */
+ "/sheets/"
+ methodConfig.getSheetId() /* sheet Id*/
+ ":copyTo",View on GitHub (pinned to 8cd9021c24)
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.
Defensive patterns
Strategy: validation
Validate before calling
// Validate spreadsheet URL is non-empty before copy operation
if (!form.spreadsheetUrl || form.spreadsheetUrl.trim() === '') {
showAlert('Spreadsheet URL is required for the Copy sheet operation', 'error');
} else {
await sheetsCopyQuery.run();
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/536c0870660b2f64.
Report an issue: GitHub.