appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

Missing required field 'Spreadsheet Url'

What it means

Thrown by RowsAppendMethod.validateExecutionMethodRequest (RowsAppendMethod.java:53) when `methodConfig.getSpreadsheetId()` is null or blank. The 'Append Rows' action appends to an existing sheet, so it needs the target spreadsheet id derived from the URL. Code PE-ARG-5000 (MISSING_SPREADSHEET_URL_ERROR_MSG).

Source

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

/**
 * API reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append
 */
public class RowsAppendMethod implements ExecutionMethod, TemplateMethod {

    ObjectMapper objectMapper;

    public RowsAppendMethod(ObjectMapper objectMapper) {
        this.objectMapper = objectMapper;
    }

    public RowsAppendMethod() {}

    @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.getSheetName() == null || methodConfig.getSheetName().isBlank()) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                    ErrorMessages.MISSING_SPREADSHEET_NAME_ERROR_MSG);
        }
        if (methodConfig.getTableHeaderIndex() != null
                && !methodConfig.getTableHeaderIndex().isBlank()) {
            try {
                if (Integer.parseInt(methodConfig.getTableHeaderIndex()) <= 0) {
                    throw new AppsmithPluginException(
                            AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                            ErrorMessages.INVALID_TABLE_HEADER_INDEX);
                }
            } catch (NumberFormatException e) {
                throw new AppsmithPluginException(
                        AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.INVALID_TABLE_HEADER_INDEX);

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Provide a full URL: `https://docs.google.com/spreadsheets/d/<id>/edit`.
  2. Ensure the bound widget has a non-empty value before the append action runs.
  3. Confirm the URL matches `https://docs.google.com/spreadsheets/d/<id>/` so id extraction succeeds.

Example fix

// before
{
  "sheetUrl": ""
}
// after
{
  "sheetUrl": {{spreadsheetSelect.selectedOptionValue}}
}
Defensive patterns

Strategy: validation

Validate before calling

// Ensure a valid URL is bound before enabling Append Rows.
function hasSpreadsheetUrl(url) {
  return typeof url === "string" && /https:\/\/docs\.google\.com\/spreadsheets\/d\//.test(url);
}
// Disable the append button: {{ !hasSpreadsheetUrl(urlInput.text) || !sheetNameInput.text }}

Type guard

function isNonBlankString(v) { return typeof v === "string" && v.trim().length > 0; }

Try / catch

if (appendRows.error && appendRows.error.message.includes("Missing required field 'Spreadsheet Url'")) {
  showToast("Select a target spreadsheet first.", "error");
}

Prevention

When it happens

Trigger: Running the 'Append Row(s)' action with the Spreadsheet URL field empty, whitespace-only, or a URL whose id could not be extracted (so the derived id is null). This is the first validation, firing before sheet-name and header-index checks.

Common situations: URL binding resolves to empty because the source widget has no value; the field was cleared; a shortened share link was used that did not match the extraction regex; the URL lacks the `https://` scheme.

Related errors


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