N8N Academy, bug de problème de commande

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)

Je suis bloqué par cette même erreur, lol. Comment la résoudre ?

J’ai exactement le même problème

tu as réussi à le résoudre ? je suis bloqué avec la même erreur

@nicknock @evanmoo @Vonn_Villasor c’est un bug que beaucoup rencontrent

@jamiemadden_n8n

Bonjour à tous,

Veuillez vérifier que vos paramètres ne contiennent pas d’espaces avant ou après le nom de la variable. Cela peut être difficile à voir dans l’interface.

Cordialement,

J’ai vérifié deux fois et j’ai recréé l’intégralité du workflow deux fois, à la fois sur le cloud et en auto-hébergé. Il retourne la même erreur sur la requête POST pour ce nœud spécifique. C’est strictement identique au tutoriel de l’académie, pourtant le backend retourne Invalid order_id.

Même deux problèmes ici sur N8N102 (actuellement bloqué à 63%, j’ai besoin de 70% pour le certificat):slight_smile:

  1. La section 1 priority-queue est le bug que @achamm a mentionné. Elle retourne 422 « Invalid order_id » pour chaque commande d’entreprise. J’ai testé directement contre l’endpoint et confirme : un order_id RÉEL, un FAUX, et une chaîne VIDE retournent tous l’erreur identique « Invalid order_id » — donc l’ensemble de validation semble être vide pour mon évaluation. L’order_id de /orders est correct (pas d’espaces blancs), donc la solution « espaces supplémentaires » ne s’applique pas ici. orders-queue fonctionne correctement (orders_queued: 50). Cela bloque à la fois l’évaluation Priority Orders Queue et l’évaluation Finalization.

  2. Ma section 2 (Webhooks) Hands-on réussit complètement — les quatre évaluations affichent 1.0/1.0 sur la page d’exercice (Secure Webhook, Data Storage, Order Processing, Processing Pipeline; « All Tests Passed »). Mais cela ne compte pas vers ma note : sur la page Progress la note « n8n Workflow » est toujours 33.33% (Section 1 uniquement) et la Section 2 n’apparaît pas dans Graded Scores. On dirait un problème de synchronisation du carnet de notes.

ID d’évaluation : 34513bee…982bf9 (ID complet disponible sur demande). L’équipe pourrait-elle corriger l’endpoint priority-queue et/ou synchroniser la note de Section 2 ? Merci !

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.

Bonjour,

J’ai trouvé le bug, c’est réparé. Réessaie s’il te plaît !

Cheers,