appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

Missing required field 'Spreadsheet Url'

What it means

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\''.

Source

Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ClearMethod.java:30

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

/**
 * API reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear
 */
public class ClearMethod implements ExecutionMethod {

    ObjectMapper objectMapper;

    public ClearMethod(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.getSpreadsheetRange() == null
                || methodConfig.getSpreadsheetRange().isBlank()) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.MISSING_CELL_RANGE_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 */
                        + "/values/"
                        + URLEncoder.encode(

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Enter a valid Google Sheets URL in the 'Spreadsheet Url' field, e.g. https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit.
  2. If using JS bindings, ensure the expression returns a non-empty valid spreadsheet URL.
  3. Verify the URL is a Google Sheets URL — other URL formats may not yield a valid spreadsheet ID.
  4. Check that the spreadsheet has not been deleted or made inaccessible.
Defensive patterns

Strategy: validation

Validate before calling

// Validate spreadsheet URL is non-empty before clear operation
if (!form.spreadsheetUrl || form.spreadsheetUrl.trim() === '') {
  showAlert('Spreadsheet URL is required for the Clear operation', 'error');
} else {
  await sheetsClearQuery.run();
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/24f845e4972d7f2c. Report an issue: GitHub.