N8N Academy, Order issue bug

Describe the problem/error/question

I reach this stage: Hands-on Exercise: Building an API Integration Pipeline Step 2.5: Send enterprise orders to priority queue. After execute the entire workflow, below error came out.

What is the error message (if any)?

Your request is invalid or could not be processed by the service [item 0]

Invalid order_id. Please ensure you are sending the correct order_id

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -32,
        112
      ],
      "id": "fee606ca-797e-47d8-af47-b655ffdc8fe1",
      "name": "TriggerManual"
    },
    {
      "parameters": {
        "url": "https://learn.app.n8n.cloud/webhook/course/n8n102/orders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Assessment-ID",
              "value": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "page",
                    "value": "={{ $pageCount + 1 }}"
                  }
                ]
              }
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        208,
        0
      ],
      "id": "f46e1a0c-072f-487b-ae64-de7188cb4bc4",
      "name": "GetOrders",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "url": "https://learn.app.n8n.cloud/webhook/course/n8n102/customers",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Assessment-ID",
              "value": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        208,
        224
      ],
      "id": "7e000a51-f7f0-4e57-b93b-8f858f077833",
      "name": "GetCustomers",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "fieldsToMatchString": "customer_id",
        "joinMode": "enrichInput1",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        432,
        112
      ],
      "id": "c09f91fd-fd86-414e-a24f-5e56aa38d9c2",
      "name": "MergeOrdersCustomers"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "enriched_orders",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        640,
        112
      ],
      "id": "47ffb582-3bbc-40af-97af-d8c4546c2d6e",
      "name": "AggregateOrders"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://learn.app.n8n.cloud/webhook/course/n8n102/orders-queue",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Assessment-ID",
              "value": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "enriched_orders",
              "value": "={{ $json.enriched_orders }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        880,
        112
      ],
      "id": "d80c1831-d69a-42da-bc3a-7e646393475d",
      "name": "SendToOrdersQueue",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d9ae70e7-274b-47c6-a87d-5469702d4b8a",
              "leftValue": "={{ $json.subscription }}",
              "rightValue": "Enterprise",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        624,
        336
      ],
      "id": "1c1e831c-ebb1-45d9-b560-acfea9bc2cbf",
      "name": "CheckSubscriptionTier"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.region }}",
                    "rightValue": "north",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "13963a78-1120-4e9e-bcc2-6485b63107ab"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "North"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "ff9f6d08-d005-416f-8e0f-8460d894a709",
                    "leftValue": "={{ $json.region }}",
                    "rightValue": "south",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "South"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "cfa065fc-5a61-40b9-a7b9-6a348dcdbd75",
                    "leftValue": "={{ $json.region }}",
                    "rightValue": "east",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "East"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "b1a239e1-bbe9-4f6e-b986-533415c4a262",
                    "leftValue": "={{ $json.region }}",
                    "rightValue": "west",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "West"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        832,
        432
      ],
      "id": "e2ecffd6-dcd7-4625-9abd-8400e0fd75a2",
      "name": "RouteByRegion"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "1a49d28e-2cf9-4ea4-a355-c85a6f146ae0",
              "leftValue": "={{ $json.status }}",
              "rightValue": "delivered",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1120,
        320
      ],
      "id": "606971a9-c796-4cb8-8ffc-af10dfbce473",
      "name": "FilterDelivered"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://learn.app.n8n.cloud/webhook/course/n8n102/priority-queue",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Assessment-ID",
              "value": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "order_id",
              "value": "={{ $json.order_id }}"
            },
            {
              "name": "customer_id",
              "value": "={{ $json.customer_id }}"
            },
            {
              "name": "company_name",
              "value": "={{ $json.customer_name }}"
            },
            {
              "name": "subscription",
              "value": "={{ $json.subscription }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        1328,
        320
      ],
      "id": "02e77179-3856-4454-88dc-c391ae6ebcde",
      "name": "SendToPriorityQueue",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    }
  ],
  "connections": {
    "TriggerManual": {
      "main": [
        [
          {
            "node": "GetOrders",
            "type": "main",
            "index": 0
          },
          {
            "node": "GetCustomers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetOrders": {
      "main": [
        [
          {
            "node": "MergeOrdersCustomers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetCustomers": {
      "main": [
        [
          {
            "node": "MergeOrdersCustomers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "MergeOrdersCustomers": {
      "main": [
        [
          {
            "node": "AggregateOrders",
            "type": "main",
            "index": 0
          },
          {
            "node": "CheckSubscriptionTier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AggregateOrders": {
      "main": [
        [
          {
            "node": "SendToOrdersQueue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SendToOrdersQueue": {
      "main": [
        []
      ]
    },
    "CheckSubscriptionTier": {
      "main": [
        [
          {
            "node": "FilterDelivered",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "RouteByRegion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FilterDelivered": {
      "main": [
        [
          {
            "node": "SendToPriorityQueue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "bed2988fb684ee16b2cfbdee45dcd5e341307ecfd375cd84c432f4ed9cece2d3"
  }
}

Share the output returned by the last node

Error code

422

Full message

422 - "{\"error\":\"Invalid order_id. Please ensure you are sending the correct order_id\"}"

Request

{ "body": { "order_id": "ORD-037", "customer_id": "CUST-007", "company_name": "Summit Enterprises", "subscription": "Enterprise" }, "headers": { "x-assessment-id": "1d6f2263fd81b44480a5486782c87be0", "**hidden**": "**hidden**", "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7" }, "method": "POST", "uri": "https://learn.app.n8n.cloud/webhook/course/n8n102/priority-queue", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "sendCredentialsOnCrossOriginRedirect": false, "followAllRedirects": true, "timeout": 300000, "encoding": null, "json": false, "useStream": true }

Information on your n8n setup

    1. n8n version: 2.15.0
    2. Database: SQLite (default)
    3. EXECUTIONS_PROCESS setting: main
    4. Running n8n via: Docker (on Zeabur)
    5. Operating system: Linux (Ubuntu 24, Zeabur hosted)

I’m stuck in this same error, lol. How to resolve this?

I have exactly same issue

did you resolve it im stuck with the same error

@nicknock @evanmoo @Vonn_Villasor this is a bug that many are having

@jamiemadden_n8n

Hi all,

Please double check that your parameters do not have any spaces before or after the variable name. It might be hard to tell in the UI.

cheers,

i double-checked and recreated the entire workflow twice both on cloud and self hosted. it returns the same error on the post request for this specific node. just same to same as the academy tutorial, still the backend returns with Invalid order_id.

Same two issues here on N8N102 (currently stuck at 63%, need 70% for the certificate):slight_smile:

  1. Section 1 priority-queue is the bug @achamm mentioned. It returns 422 “Invalid order_id” for every enterprise order. I tested directly against the endpoint and confirmed: a REAL order_id, a FAKE one, and an EMPTY string all return the identical “Invalid order_id” error — so the validation set appears to be empty for my assessment. The order_id from /orders is clean (no whitespace), so the “extra spaces” workaround doesn’t apply here. orders-queue works fine (orders_queued: 50). This blocks both the Priority Orders Queue and Finalization assessments.

  2. My Section 2 (Webhooks) Hands-on is fully passing — all four assessments show 1.0/1.0 on the exercise page (Secure Webhook, Data Storage, Order Processing, Processing Pipeline; “All Tests Passed”). But it isn’t counting toward my grade: on the Progress page the “n8n Workflow” grade is still 33.33% (Section 1 only) and Section 2 doesn’t appear under Graded Scores. Looks like a gradebook sync issue.

Assessment ID: 34513bee…982bf9 (full ID available on request). Could the team please fix the priority-queue endpoint and/or sync the Section 2 grade? Thank you!

Hey everyone,

I am experiencing the same bug on Step 2.5 of the N8N102 course that others have mentioned recently.

My SendToPriorityQueue node is throwing a 422 - "Invalid order_id" error, even though the order ID being sent is valid (e.g., ORD-005).

I have verified my workflow setup:

  • Data mapping is correct (={{ $json.order_id }}).
  • The BatchPriorityOrders loop is properly closed.
  • Batch size is correctly set to 5.

Here are screenshots showing the error:

And here is my workflow code for reference:

@jamiemadden_n8n @testn8n_Santiago
Thanks @jamiemadden_n8n and the team for looking into this bug.

Hello,

Found the bug, its been fixed. Please try again!

cheers,