Zie619/n8n-workflows · error · Error

Submission ID is missing

Error message

Submission ID is missing

What it means

Thrown by 'Verify Requested Quantity' when the payload lacks `Submission ID`. Submission ID is the correlation key used to retrieve the issue request row from Google Sheets ('Retrieve Issue Request Details') and to update it after approval; without it the rest of the flow cannot match records.

Source

Thrown at workflows/Code/0926_Code_Webhook_Create_Webhook.json:1605

        6340,
        3400
      ],
      "parameters": {
        "jsCode": "const input = $input.all()[0].json;\nconst quantityRequested= input[\"Quantity Requested\"];\n\nif (quantityRequested <= 0) throw new Error(`Invalid quantity Requested: ${quantityRequested}. Must be greater than 0`);\n\nreturn { json: input };"
      },
      "typeVersion": 2,
      "notes": "This code node performs automated tasks as part of the workflow."
    },
    {
      "id": "6d88db70-6b4f-47c5-8093-ab339762edbe",
      "name": "Verify Requested Quantity",
      "type": "n8n-nodes-base.code",
      "position": [
        6560,
        3400
      ],
      "parameters": {
        "jsCode": "const input = $input.all()[0].json;\nconst quantityRequested = input[\"Quantity Requested\"];\nif (!input[\"Product ID\"]) throw new Error(\"Product ID is missing\");\nif (quantityRequested <= 0) throw new Error(`Invalid quantity requested: ${quantityRequested}`);\nif (!input[\"Submission ID\"]) throw new Error(\"Submission ID is missing\");\nreturn { json: input };"
      },
      "typeVersion": 2,
      "notes": "This code node performs automated tasks as part of the workflow."
    },
    {
      "id": "bd2313cc-e3c9-4405-a1ed-8f64969e5bca",
      "name": "Check Available Stock for Issue",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        7000,
        3240
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json[\"Product ID\"] }}",

View on GitHub (pinned to 94007c1445)

Solutions

  1. Ensure the request form/webhook client always sends Submission ID (hidden field, UUID) and with the exact key.
  2. If the system should generate it, generate before this node and skip this check for new submissions.
  3. Include Object.keys(input) in the error message to catch key-name mismatches fast.
  4. Validate presence and format (non-empty, expected pattern) at the webhook entry.

Example fix

// before
if (!input["Submission ID"]) throw new Error("Submission ID is missing");

// after
const submissionId = input["Submission ID"] ?? input["submission_id"];
if (typeof submissionId !== 'string' || submissionId.trim() === '') {
  throw new Error(`Submission ID is missing (fields received: ${Object.keys(input).join(', ')})`);
}
Defensive patterns

Strategy: validation

Validate before calling

const submissionId = input['Submission ID'] ?? input['submission_id'];
if (typeof submissionId !== 'string' || submissionId.trim() === '') {
  throw new Error(`Submission ID is missing (fields: ${Object.keys(input).join(', ')})`);
}

Type guard

const isNonEmptyString = (v) => typeof v === 'string' && v.trim().length > 0;

Prevention

When it happens

Trigger: Form or API client omitted Submission ID; key named differently (submission_id, SubmissionID); the field present but empty string (empty string is falsy so it throws); payload lost the field in a Set/Function node upstream.

Common situations: Submission ID generated downstream instead of supplied by the requester; form edits removing the hidden ID field; manual testing without copying the full payload.

Related errors


AI-assisted analysis of Zie619/n8n-workflows@94007c1445 (2026-08-15). Data as JSON: /api/errors/07890105bbeb12f4. Report an issue: GitHub.